diff --git a/res/postinstall.sh b/res/postinstall.sh index bedc64d..1e095ad 100644 --- a/res/postinstall.sh +++ b/res/postinstall.sh @@ -22,7 +22,8 @@ upgrade() { systemctl daemon-reload ||: echo " Start/Restart systemd service unit" systemctl try-restart $UNITNAME ||: - systemctl is-enabled $UNITNAME && systemctl start $UNITNAME ||: + systemctl is-enabled $UNITNAME >/dev/null && \ + systemctl start $UNITNAME ||: } action="$1" diff --git a/res/postremove.sh b/res/postremove.sh index c01e5ac..89fa68e 100644 --- a/res/postremove.sh +++ b/res/postremove.sh @@ -5,7 +5,7 @@ UNITNAME=pveportal.service remove() { echo "Running normal postremove:" echo " Stop systemd service unit" - systemctl stop $UNITNAME ||: + systemctl stop $UNITNAME 2>/dev/null ||: echo " Reload systemd service unit file" systemctl daemon-reload ||: }