Rename distro/ to systemd/.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 6 Jan 2018 16:03:05 +0000 (17:03 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 6 Jan 2018 16:03:05 +0000 (17:03 +0100)
Systemd service files are not supposed to be distribution-specific.

.gitignore
Makefile.am
configure.ac
distro/Makefile.am [deleted file]
distro/tinc.service.in [deleted file]
distro/tinc@.service.in [deleted file]
systemd/Makefile.am [new file with mode: 0644]
systemd/tinc.service.in [new file with mode: 0644]
systemd/tinc@.service.in [new file with mode: 0644]

index 41d240d..3c8c4d3 100644 (file)
@@ -26,5 +26,6 @@ stamp-h1
 /doc/*.html
 /doc/*.pdf
 /doc/*.t2p
+/systemd/*.service
 /ChangeLog
 core*
index bfaf557..8e43fe5 100644 (file)
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = gnu
 
-SUBDIRS = src doc distro
+SUBDIRS = src doc systemd
 
 ACLOCAL_AMFLAGS = -I m4 
 
index ff57755..c6b2563 100644 (file)
@@ -242,6 +242,6 @@ if test "x$runstatedir" = "x"; then
   AC_SUBST([runstatedir], ['${localstatedir}/run'])
 fi
 
-AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile distro/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile systemd/Makefile])
 
 AC_OUTPUT
diff --git a/distro/Makefile.am b/distro/Makefile.am
deleted file mode 100644 (file)
index dac2b73..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-EXTRA_DIST = tinc.service.in tinc@.service.in
-
-CLEANFILES = tinc.service tinc@.service
-
-if WITH_SYSTEMD
-systemddir = @systemd_path@
-nodist_systemd_DATA = tinc.service tinc@.service
-endif
-
-substitute = sed \
-        -e s,'@sbindir\@',"$(sbindir)",g \
-        -e s,'@sysconfdir\@',"$(sysconfdir)",g
-
-tinc.service: $(srcdir)/tinc.service.in
-       $(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@
-
-tinc@.service: $(srcdir)/tinc@.service.in
-       $(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@
diff --git a/distro/tinc.service.in b/distro/tinc.service.in
deleted file mode 100644 (file)
index b671042..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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=@sysconfdir@/tinc
-
-[Install]
-WantedBy=multi-user.target
diff --git a/distro/tinc@.service.in b/distro/tinc@.service.in
deleted file mode 100644 (file)
index 8fbf551..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=Tinc net %i
-Documentation=info:tinc
-Documentation=man:tinc(8) man:tinc.conf(5)
-Documentation=http://tinc-vpn.org/docs/
-PartOf=tinc.service
-ReloadPropagatedFrom=tinc.service
-
-[Service]
-Type=simple
-WorkingDirectory=@sysconfdir@/tinc/%i
-ExecStart=@sbindir@/tincd -n %i -D
-ExecReload=@sbindir@/tincd -n %i -kHUP
-KillMode=mixed
-Restart=on-failure
-RestartSec=5
-TimeoutStopSec=5
-
-[Install]
-WantedBy=tinc.service
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
new file mode 100644 (file)
index 0000000..dac2b73
--- /dev/null
@@ -0,0 +1,18 @@
+EXTRA_DIST = tinc.service.in tinc@.service.in
+
+CLEANFILES = tinc.service tinc@.service
+
+if WITH_SYSTEMD
+systemddir = @systemd_path@
+nodist_systemd_DATA = tinc.service tinc@.service
+endif
+
+substitute = sed \
+        -e s,'@sbindir\@',"$(sbindir)",g \
+        -e s,'@sysconfdir\@',"$(sysconfdir)",g
+
+tinc.service: $(srcdir)/tinc.service.in
+       $(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@
+
+tinc@.service: $(srcdir)/tinc@.service.in
+       $(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@
diff --git a/systemd/tinc.service.in b/systemd/tinc.service.in
new file mode 100644 (file)
index 0000000..b671042
--- /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=@sysconfdir@/tinc
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/tinc@.service.in b/systemd/tinc@.service.in
new file mode 100644 (file)
index 0000000..8fbf551
--- /dev/null
@@ -0,0 +1,20 @@
+[Unit]
+Description=Tinc net %i
+Documentation=info:tinc
+Documentation=man:tinc(8) man:tinc.conf(5)
+Documentation=http://tinc-vpn.org/docs/
+PartOf=tinc.service
+ReloadPropagatedFrom=tinc.service
+
+[Service]
+Type=simple
+WorkingDirectory=@sysconfdir@/tinc/%i
+ExecStart=@sbindir@/tincd -n %i -D
+ExecReload=@sbindir@/tincd -n %i -kHUP
+KillMode=mixed
+Restart=on-failure
+RestartSec=5
+TimeoutStopSec=5
+
+[Install]
+WantedBy=tinc.service