unbound/unbound.service
Tomas Korbar 0112876df6 Enabled libsystemd and change unbound service type to notify-reload
"notify-reload" service type allows unbound to notify systemd
not only about its readiness on startup but also about start and
finish of reloading process.

Resolves: RHEL-77790
2025-02-05 16:21:31 +01:00

20 lines
709 B
Desktop File

[Unit]
Description=Unbound recursive Domain Name Server
After=network.target
After=unbound-keygen.service
Wants=unbound-keygen.service
Wants=unbound-anchor.timer
Before=nss-lookup.target
Wants=nss-lookup.target
[Service]
Type=notify-reload
EnvironmentFile=-/etc/sysconfig/unbound
ExecStartPre=/usr/sbin/unbound-checkconf
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_UNBOUND_ANCHOR" == "yes" ]; then /usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem -f /etc/resolv.conf -R; else echo "Updates of root keys with unbound-anchor is disabled"; fi'
ExecStart=/usr/sbin/unbound -d $UNBOUND_OPTIONS
ExecReload=/usr/sbin/unbound-control reload
[Install]
WantedBy=multi-user.target