From e40f88aa69d921c888f80e3e5e2611a425cf300d Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 23 Dec 2020 10:50:54 +0100 Subject: [PATCH] bundles/unbound: only start unbound after pppoe.service has been started (fixes #23) --- bundles/unbound/files/override.conf | 3 +++ bundles/unbound/items.py | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 bundles/unbound/files/override.conf diff --git a/bundles/unbound/files/override.conf b/bundles/unbound/files/override.conf new file mode 100644 index 0000000..154df85 --- /dev/null +++ b/bundles/unbound/files/override.conf @@ -0,0 +1,3 @@ +[Unit] +After= +After=pppoe.service diff --git a/bundles/unbound/items.py b/bundles/unbound/items.py index 7c72825..03c4a60 100644 --- a/bundles/unbound/items.py +++ b/bundles/unbound/items.py @@ -50,3 +50,12 @@ if node.has_bundle('netdata'): 'svc_systemd:netdata:restart', }, } + +if node.has_bundle('pppd'): + files['/etc/systemd/system/unbound.service.d/bundlewrap.conf'] = { + 'source': 'override.conf', + 'triggers': { + 'action:systemd-reload', + 'svc_systemd:unbound:restart', + }, + }