From fa889fac79462a39556e0306d6aac15c7a1fcb5a Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Wed, 30 Jan 2019 17:46:00 +0100 Subject: [PATCH 1/2] unbound: Add systemd service unit $ ls -l --full-time /etc/systemd/system/unbound.service -rw-r--r-- 1 root root 232 2014-12-18 14:49:19.000000000 +0100 /etc/systemd/system/unbound.service --- install.sh | 1 + misc_systemd_units/unbound.service | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 misc_systemd_units/unbound.service diff --git a/install.sh b/install.sh index f949615..91b7077 100755 --- a/install.sh +++ b/install.sh @@ -90,6 +90,7 @@ install_data misc_systemd_units/automount.service "$DESTDIR$systemdunitdi install_data misc_systemd_units/enable_overcommit_memory.service "$DESTDIR$systemdunitdir/enable_overcommit_memory.service" install_data misc_systemd_units/gdm.service "$DESTDIR$systemdunitdir/gdm.service" install_data misc_systemd_units/lazy-umount-nfs.service "$DESTDIR$systemdunitdir/lazy-umount-nfs.service" +install_data misc_systemd_units/unbound.service "$DESTDIR$systemdunitdir/unbound.service" install_exec mkmotd/mkmotd.pl "$DESTDIR$usr_sbindir/mkmotd.pl" install_data mkmotd/motd.service "$DESTDIR$systemdunitdir/motd.service" install_exec mxgrub/mxgrub "$DESTDIR$usr_sbindir/mxgrub" diff --git a/misc_systemd_units/unbound.service b/misc_systemd_units/unbound.service new file mode 100644 index 0000000..90ef1ac --- /dev/null +++ b/misc_systemd_units/unbound.service @@ -0,0 +1,12 @@ +[Unit] +After=network.service gateway.service mxmount.service + +[Service] +Type=forking +ExecStartPre=-/usr/sbin/unbound-startup setup-var +ExecStart=/usr/sbin/unbound +PIDFile=/var/unbound/unbound.pid + +[Install] +WantedBy=network.target + From 95e8f4f3a0a77b8c6d67a164631cc801324644bf Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 31 Jan 2019 00:02:13 +0100 Subject: [PATCH 2/2] unbound.service: Remove ordering dependency on `mxmount.service` There is no reason to start Unbound after mxmount has started up, so remove the ordering dependency. The dependency was likely introduced by copying-and-pasting. --- misc_systemd_units/unbound.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc_systemd_units/unbound.service b/misc_systemd_units/unbound.service index 90ef1ac..b03d713 100644 --- a/misc_systemd_units/unbound.service +++ b/misc_systemd_units/unbound.service @@ -1,5 +1,5 @@ [Unit] -After=network.service gateway.service mxmount.service +After=network.service gateway.service [Service] Type=forking