Revert "Remove tinc.service, it is not necessary."
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 1 May 2016 10:07:44 +0000 (12:07 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 1 May 2016 10:07:44 +0000 (12:07 +0200)
This reverts commit 0b6f84f96eeed20a0d771fedb72c0e19941adb7e. Although
systemd does automatically provide a "tinc.slice" when there is only a
tinc@.service template, it doesn't quite work the same way as
tinc.service.

systemd/Makefile.am
systemd/tinc.service [new file with mode: 0644]

index 043ec74..a1bfe12 100644 (file)
@@ -1,4 +1,4 @@
 if WITH_SYSTEMD
 systemddir = @systemd_path@
-dist_systemd_DATA = tinc@.service
+dist_systemd_DATA = tinc.service tinc@.service
 endif
diff --git a/systemd/tinc.service b/systemd/tinc.service
new file mode 100644 (file)
index 0000000..d911fa7
--- /dev/null
@@ -0,0 +1,20 @@
+# This is a mostly empty service, but allows commands like stop, start, reload
+# to propagate to all tinc@ service instances.
+
+[Unit]
+Description=Tinc VPN
+Documentation=info:tinc
+Documentation=man:tinc(8) man:tinc.conf(5)
+Documentation=http://tinc-vpn.org/docs/
+After=network.target
+Wants=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/true
+ExecReload=/bin/true
+WorkingDirectory=/etc/tinc
+
+[Install]
+WantedBy=multi-user.target