mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-09-26 03:29:10 +02:00
Use a more general method to determine whether systemd is the init system (#6043)
This commit is contained in:
commit
822e677c5c
@ -1152,8 +1152,7 @@ installConfigs() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install pihole-FTL systemd or init.d service, based on whether systemd is the init system or not
|
# 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 ps -p 1 -o comm= | grep -q systemd; then
|
||||||
if [[ -d '/run/systemd/system' ]]; then
|
|
||||||
install -T -m 0644 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.systemd" '/etc/systemd/system/pihole-FTL.service'
|
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
|
# Remove init.d service if present
|
||||||
|
Loading…
x
Reference in New Issue
Block a user