From 4f40711980f49488ba15a7c38a618d4282298413 Mon Sep 17 00:00:00 2001 From: Marco98 Date: Sun, 4 Aug 2024 00:45:34 +0200 Subject: [PATCH] fix: skip package hooks if systemd is unavailable --- res/postinstall.sh | 2 ++ res/postremove.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/res/postinstall.sh b/res/postinstall.sh index 1e095ad..4387e69 100644 --- a/res/postinstall.sh +++ b/res/postinstall.sh @@ -2,6 +2,8 @@ UNITNAME=pveportal.service +command -V systemctl >/dev/null 2>&1 || exit 0 + cleanInstall() { echo "Runinng clean postinstall:" echo " Reload systemd service unit file" diff --git a/res/postremove.sh b/res/postremove.sh index 89fa68e..88111a0 100644 --- a/res/postremove.sh +++ b/res/postremove.sh @@ -2,6 +2,8 @@ UNITNAME=pveportal.service +command -V systemctl >/dev/null 2>&1 || exit 0 + remove() { echo "Running normal postremove:" echo " Stop systemd service unit"