]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
init: Rename systemd units
authorTobias Brunner <tobias@strongswan.org>
Fri, 29 Mar 2019 09:00:42 +0000 (10:00 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 24 Apr 2019 11:57:48 +0000 (13:57 +0200)
Use strongswan-starter for the legacy unit and simply strongswan for the
modern one (strongswan-swanctl is configured as alias, which should
cause the installation of symlinks when the service is enabled via
systemctl).

configure.ac
init/Makefile.am
init/systemd-starter/.gitignore [new file with mode: 0644]
init/systemd-starter/Makefile.am [new file with mode: 0644]
init/systemd-starter/strongswan-starter.service.in [new file with mode: 0644]
init/systemd-swanctl/.gitignore [deleted file]
init/systemd-swanctl/Makefile.am [deleted file]
init/systemd-swanctl/strongswan-swanctl.service.in [deleted file]
init/systemd/Makefile.am
init/systemd/strongswan.service.in

index 9a1c5a30d2627a0dfb94914703b4b32f9785d04c..78b38773471da5104b0bd027be4bd3e507fadaf8 100644 (file)
@@ -1819,7 +1819,7 @@ AC_CONFIG_FILES([
        man/Makefile
        init/Makefile
        init/systemd/Makefile
-       init/systemd-swanctl/Makefile
+       init/systemd-starter/Makefile
        src/Makefile
        src/include/Makefile
        src/libstrongswan/Makefile
index 6fff4221b8a220f4ce619a5c9ca2e7a1c31e7489..54c090cea93afe43b822710a7cc503b5a6df0aa3 100644 (file)
@@ -3,12 +3,12 @@ SUBDIRS =
 
 if USE_LEGACY_SYSTEMD
 if USE_CHARON
-  SUBDIRS += systemd
+  SUBDIRS += systemd-starter
 endif
 endif
 
 if USE_SYSTEMD
 if USE_SWANCTL
-  SUBDIRS += systemd-swanctl
+  SUBDIRS += systemd
 endif
 endif
diff --git a/init/systemd-starter/.gitignore b/init/systemd-starter/.gitignore
new file mode 100644 (file)
index 0000000..1eeaa29
--- /dev/null
@@ -0,0 +1 @@
+strongswan-starter.service
diff --git a/init/systemd-starter/Makefile.am b/init/systemd-starter/Makefile.am
new file mode 100644 (file)
index 0000000..f8b02a3
--- /dev/null
@@ -0,0 +1,12 @@
+
+EXTRA_DIST = strongswan-starter.service.in
+CLEANFILES = strongswan-starter.service
+
+systemdsystemunit_DATA = strongswan-starter.service
+
+strongswan-starter.service : strongswan-starter.service.in
+       $(AM_V_GEN) \
+       sed \
+       -e "s:@SBINDIR@:$(sbindir):" \
+       -e "s:@IPSEC_SCRIPT@:$(ipsec_script):" \
+       $(srcdir)/$@.in > $@
diff --git a/init/systemd-starter/strongswan-starter.service.in b/init/systemd-starter/strongswan-starter.service.in
new file mode 100644 (file)
index 0000000..474284a
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
+After=syslog.target network-online.target
+
+[Service]
+ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
+StandardOutput=syslog
+Restart=on-abnormal
+
+[Install]
+WantedBy=multi-user.target
diff --git a/init/systemd-swanctl/.gitignore b/init/systemd-swanctl/.gitignore
deleted file mode 100644 (file)
index b973780..0000000
+++ /dev/null
@@ -1 +0,0 @@
-strongswan-swanctl.service
diff --git a/init/systemd-swanctl/Makefile.am b/init/systemd-swanctl/Makefile.am
deleted file mode 100644 (file)
index eee30ac..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-EXTRA_DIST = strongswan-swanctl.service.in
-CLEANFILES = strongswan-swanctl.service
-
-systemdsystemunit_DATA = strongswan-swanctl.service
-
-strongswan-swanctl.service : strongswan-swanctl.service.in
-       $(AM_V_GEN) \
-       sed \
-       -e "s:@SBINDIR@:$(sbindir):" \
-       $(srcdir)/$@.in > $@
diff --git a/init/systemd-swanctl/strongswan-swanctl.service.in b/init/systemd-swanctl/strongswan-swanctl.service.in
deleted file mode 100644 (file)
index db8266a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
-After=network-online.target
-
-[Service]
-Type=notify
-ExecStart=@SBINDIR@/charon-systemd
-ExecStartPost=@SBINDIR@/swanctl --load-all --noprompt
-ExecReload=@SBINDIR@/swanctl --reload
-ExecReload=@SBINDIR@/swanctl --load-all --noprompt
-Restart=on-abnormal
-
-[Install]
-WantedBy=multi-user.target
index e4b7166d66c3d461e966ad1753d2550fff4bbe25..b49de3b91d6dda1986e09d20d9fe25da45a229a5 100644 (file)
@@ -8,5 +8,4 @@ strongswan.service : strongswan.service.in
        $(AM_V_GEN) \
        sed \
        -e "s:@SBINDIR@:$(sbindir):" \
-       -e "s:@IPSEC_SCRIPT@:$(ipsec_script):" \
        $(srcdir)/$@.in > $@
index 474284a198d22f18d8598874be178c0fb4962dad..87ad0c905daab97dbf521b31975a5134a839c972 100644 (file)
@@ -1,11 +1,15 @@
 [Unit]
-Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
-After=syslog.target network-online.target
+Description=strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
+After=network-online.target
 
 [Service]
-ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
-StandardOutput=syslog
+Type=notify
+ExecStart=@SBINDIR@/charon-systemd
+ExecStartPost=@SBINDIR@/swanctl --load-all --noprompt
+ExecReload=@SBINDIR@/swanctl --reload
+ExecReload=@SBINDIR@/swanctl --load-all --noprompt
 Restart=on-abnormal
 
 [Install]
 WantedBy=multi-user.target
+Alias=strongswan-swanctl.service