SYSTEMCTL: Check if running before stopping
When uninstalling the RDC application - the user is greeted with an annoying "Failed to stop rdc.service..." message if the RDC is not running. This change makes sure RDC is active before trying to stop it. Change-Id: I6fa57bfd4b9c348514cd6c38e60ed3930d32b62c Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Этот коммит содержится в:
1 родитель
c82fdeab8d
Коммит
6e52a113a2
2 files changed
+4
-4
No files matched your search
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
stop_rdc() {
|
||||
if [ -d /run/systemd/system ]; then
|
||||
#stop RDC if running
|
||||
#stop RDC service if systemd exists and service is running
|
||||
if [ -d /run/systemd/system ] && $( systemctl is-active --quiet rdc ); then
|
||||
systemctl stop rdc
|
||||
fi
|
||||
return 0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
stop_rdc() {
|
||||
#stop RDC if running
|
||||
if [ -d /run/systemd/system ]; then
|
||||
#stop RDC service if systemd exists and service is running
|
||||
if [ -d /run/systemd/system ] && $( systemctl is-active --quiet rdc ); then
|
||||
systemctl stop rdc
|
||||
fi
|
||||
return 0
|
||||
|
||||
Reference in new issue
Block a user