You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pi-hole/advanced/pihole-FTL.systemd

41 lines
1.3 KiB

[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=pihole
Group=pihole
PermissionsStartOnly=true
Type=forking
PIDFile=/run/pihole-FTL.pid
ExecStartPre=/bin/bash /opt/pihole/pihole-FTL-prestart.sh
;ExecStartPre=/sbin/setcap cap_net_bind_service,cap_net_raw,cap_net_admin+eip /usr/bin/pihole-FTL
ExecStart=/usr/bin/pihole-FTL
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