1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-08-04 13:25:24 +00:00
pi-hole/advanced/pihole-FTL.service
2018-04-15 21:42:50 +02:00

39 lines
1.2 KiB
Desktop File

[Unit]
Description=Pi-hole FTLDNS
; This unit is supposed to indicate when network functionality is available, but it is only
; very weakly defined what that is supposed to mean, with one exception: at shutdown, a unit
; that is ordered after network.target will be stopped before the network
After=network.target
Requires=network.target
; A target that should be used as synchronization point for all host/network name service lookups.
; All services for which the availability of full host/network name resolution is essential should
; be ordered after this target, but not pull it in.
Wants=nss-lookup.target
Before=nss-lookup.target
[Service]
Restart=on-abnormal
User=root
Group=root
Type=forking
PIDFile=/run/pihole-FTL.pid
ExecStartPre=/bin/bash /opt/pihole/pihole-FTL-prestart.sh
ExecStart=/bin/su -s /bin/sh -c "/usr/bin/pihole-FTL" "pihole"
ExecReload=/bin/kill -HUP $MAINPID
; Use graceful shutdown with a reasonable timeout
KillMode=mixed
TimeoutStopSec=10s
; Make /usr, /boot, /etc and possibly some more folders read-only...
ProtectSystem=full
; ... except /etc/pihole
; This merely retains r/w access rights, it does not add any new.
; Must still be writable on the host!
ReadWriteDirectories=/etc/pihole
[Install]
WantedBy=multi-user.target