From 6c7b4fb2f781d33fb49e760b34dd2595e1adc0fb Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Sat, 28 Sep 2019 15:59:13 +0000 Subject: systemd, changelog, bump --- dist/systemd/wgconfd-state@.service | 10 ++++++++++ dist/systemd/wgconfd@.service | 7 +++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 dist/systemd/wgconfd-state@.service (limited to 'dist') diff --git a/dist/systemd/wgconfd-state@.service b/dist/systemd/wgconfd-state@.service new file mode 100644 index 0000000..6aed8e8 --- /dev/null +++ b/dist/systemd/wgconfd-state@.service @@ -0,0 +1,10 @@ +[Unit] +Description=WireGuard runtime state for %i + +[Service] +Type=oneshot +ExecStart=/bin/true +RemainAfterExit=true +RuntimeDirectory=wgconfd/%i +RuntimeDirectoryMode=0700 +RuntimeDirectoryPreserve=no diff --git a/dist/systemd/wgconfd@.service b/dist/systemd/wgconfd@.service index 3b85809..971681d 100644 --- a/dist/systemd/wgconfd@.service +++ b/dist/systemd/wgconfd@.service @@ -1,7 +1,8 @@ [Unit] Description=WireGuard configuration daemon on %i Wants=network.target -After=network-pre.target +Requires=wgconfd-state@%i.service +After=network-pre.target wgconfd-state@%i.service Before=network.target [Service] @@ -9,11 +10,9 @@ Type=simple CapabilityBoundingSet=CAP_NET_ADMIN Restart=on-failure RestartSec=0 -RuntimeDirectory=wgconfd/%i -RuntimeDirectoryMode=0700 -RuntimeDirectoryPreserve=yes CacheDirectory=wgconfd/%i CacheDirectoryMode=0700 +Environment=RUNTIME_DIRECTORY=%t/wgconfd/%i ExecStart=/usr/bin/env wgconfd %i /etc/wireguard/%i.toml StandardError=journal SyslogLevelPrefix=true -- cgit