From bef8227cbdd8a370046b08a29d75abe43361629e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 3 Mar 2025 20:16:07 +0100 Subject: [PATCH] Use a more general method to determine whether systemd is the init system Signed-off-by: DL6ER --- automated install/basic-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index e69256ff..f419ab6c 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1281,8 +1281,7 @@ installConfigs() { fi # Install pihole-FTL systemd or init.d service, based on whether systemd is the init system or not - # Follow debhelper logic, which checks for /run/systemd/system to derive whether systemd is the init system - if [[ -d '/run/systemd/system' ]]; then + if ps -p 1 -o comm= | grep -q systemd; then install -T -m 0644 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.systemd" '/etc/systemd/system/pihole-FTL.service' # Remove init.d service if present