Do exit with 1 in case service is not present while running conditional-restart.sh.
This commit is contained in:
parent
4017e9ebdc
commit
f5760b6f5e
1 changed files with 1 additions and 1 deletions
|
@ -7,4 +7,4 @@
|
|||
|
||||
SERVICE=$1
|
||||
# Check if service unit is present before trying to restart it
|
||||
/usr/bin/systemctl cat $1.service &>/dev/null && /usr/bin/systemctl try-restart $1
|
||||
/usr/bin/systemctl cat $1.service &>/dev/null && /usr/bin/systemctl try-restart $1 || true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue