From: Guus Sliepen Date: Sat, 6 Jan 2018 16:03:05 +0000 (+0100) Subject: Rename distro/ to systemd/. X-Git-Tag: release-1.0.34~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5865fd2676b8c77ac8f71b3fd997593cafbd153f;p=oweals%2Ftinc.git Rename distro/ to systemd/. Systemd service files are not supposed to be distribution-specific. --- diff --git a/.gitignore b/.gitignore index 41d240d..3c8c4d3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,6 @@ stamp-h1 /doc/*.html /doc/*.pdf /doc/*.t2p +/systemd/*.service /ChangeLog core* diff --git a/Makefile.am b/Makefile.am index bfaf557..8e43fe5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = gnu -SUBDIRS = src doc distro +SUBDIRS = src doc systemd ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index ff57755..c6b2563 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index dac2b73..0000000 --- a/distro/Makefile.am +++ /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 index b671042..0000000 --- a/distro/tinc.service.in +++ /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 index 8fbf551..0000000 --- a/distro/tinc@.service.in +++ /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 index 0000000..dac2b73 --- /dev/null +++ b/systemd/Makefile.am @@ -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 index 0000000..b671042 --- /dev/null +++ b/systemd/tinc.service.in @@ -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 index 0000000..8fbf551 --- /dev/null +++ b/systemd/tinc@.service.in @@ -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