Files
cloudron-box/setup/start/systemd/unbound.service
2024-09-10 09:48:10 +02:00

20 lines
549 B
Desktop File

# The default ubuntu unbound service uses SysV fallback mode, we want a proper unit file so unbound gets restarted correctly
[Unit]
Description=Unbound DNS Resolver
After=network-online.target
Before=nss-lookup.target
Wants=network-online.target nss-lookup.target
[Service]
PIDFile=/run/unbound.pid
ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key
ExecStart=/usr/sbin/unbound -d
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
# On ubuntu 16, this doesn't work for some reason
Type=notify
[Install]
WantedBy=multi-user.target