From 35aa512a29278155aa84d90481a733c23c44cdd7 Mon Sep 17 00:00:00 2001 From: Marco98 Date: Fri, 26 Jul 2024 12:41:59 +0200 Subject: [PATCH] fix: remove unneeded output from package hooks --- res/postinstall.sh | 3 ++- res/postremove.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 ||: }