Skip to content

Instantly share code, notes, and snippets.

@physhster
Forked from kometchtech/unbound.service
Last active February 25, 2016 02:36
Show Gist options
  • Save physhster/c2e760360a0ae5eb42a0 to your computer and use it in GitHub Desktop.
Save physhster/c2e760360a0ae5eb42a0 to your computer and use it in GitHub Desktop.
unbound systemd for debian jessie
[Unit]
Description=Unbound recursive Domain Name Server
After=syslog.target network.target network-online.target
After=unbound-keygen.service
Wants=network-online.target
Wants=unbound-keygen.service
Wants=unbound-anchor.timer
Before=nss-lookup.target
Wants=nss-lookup.target
[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/unbound
ExecStartPre=/usr/sbin/unbound-checkconf
ExecStartPre=-/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem
ExecStart=/usr/sbin/unbound -d $UNBOUND_OPTIONS
[Install]
WantedBy=multi-user.target
@physhster
Copy link
Author

Adding
Wants=network-online.target
After=network-online.target
Ensures that the network is up before Unbound attempts to bind to an IP/port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment