init: Rename systemd units
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).
This commit is contained in:
+1
-1
@@ -1819,7 +1819,7 @@ AC_CONFIG_FILES([
|
|||||||
man/Makefile
|
man/Makefile
|
||||||
init/Makefile
|
init/Makefile
|
||||||
init/systemd/Makefile
|
init/systemd/Makefile
|
||||||
init/systemd-swanctl/Makefile
|
init/systemd-starter/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/include/Makefile
|
src/include/Makefile
|
||||||
src/libstrongswan/Makefile
|
src/libstrongswan/Makefile
|
||||||
|
|||||||
+2
-2
@@ -3,12 +3,12 @@ SUBDIRS =
|
|||||||
|
|
||||||
if USE_LEGACY_SYSTEMD
|
if USE_LEGACY_SYSTEMD
|
||||||
if USE_CHARON
|
if USE_CHARON
|
||||||
SUBDIRS += systemd
|
SUBDIRS += systemd-starter
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if USE_SYSTEMD
|
if USE_SYSTEMD
|
||||||
if USE_SWANCTL
|
if USE_SWANCTL
|
||||||
SUBDIRS += systemd-swanctl
|
SUBDIRS += systemd
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
strongswan-starter.service
|
||||||
@@ -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 > $@
|
||||||
@@ -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
|
||||||
@@ -1 +0,0 @@
|
|||||||
strongswan-swanctl.service
|
|
||||||
@@ -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 > $@
|
|
||||||
@@ -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
|
|
||||||
@@ -8,5 +8,4 @@ strongswan.service : strongswan.service.in
|
|||||||
$(AM_V_GEN) \
|
$(AM_V_GEN) \
|
||||||
sed \
|
sed \
|
||||||
-e "s:@SBINDIR@:$(sbindir):" \
|
-e "s:@SBINDIR@:$(sbindir):" \
|
||||||
-e "s:@IPSEC_SCRIPT@:$(ipsec_script):" \
|
|
||||||
$(srcdir)/$@.in > $@
|
$(srcdir)/$@.in > $@
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
|
Description=strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
|
||||||
After=syslog.target network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
|
Type=notify
|
||||||
StandardOutput=syslog
|
ExecStart=@SBINDIR@/charon-systemd
|
||||||
|
ExecStartPost=@SBINDIR@/swanctl --load-all --noprompt
|
||||||
|
ExecReload=@SBINDIR@/swanctl --reload
|
||||||
|
ExecReload=@SBINDIR@/swanctl --load-all --noprompt
|
||||||
Restart=on-abnormal
|
Restart=on-abnormal
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Alias=strongswan-swanctl.service
|
||||||
|
|||||||
Reference in New Issue
Block a user