init: Provide a service file for charon-systemd using swanctl

This commit is contained in:
Martin Willi 2014-09-11 16:23:53 +02:00
parent b2f76c514d
commit 0097141858
5 changed files with 28 additions and 0 deletions

View File

@ -1566,6 +1566,7 @@ AC_CONFIG_FILES([
man/Makefile
init/Makefile
init/systemd/Makefile
init/systemd-swanctl/Makefile
src/Makefile
src/include/Makefile
src/libstrongswan/Makefile

View File

@ -4,3 +4,9 @@ SUBDIRS =
if USE_LEGACY_SYSTEMD
SUBDIRS += systemd
endif
if USE_SYSTEMD
if USE_SWANCTL
SUBDIRS += systemd-swanctl
endif
endif

1
init/systemd-swanctl/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
strongswan-swanctl.service

View File

@ -0,0 +1,11 @@
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 > $@

View File

@ -0,0 +1,9 @@
[Unit]
Description=strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
After=network.target
[Service]
Type=notify
ExecStart=@SBINDIR@/charon-systemd
ExecStartPost=@SBINDIR@/swanctl --load-all --noprompt
ExecReload=@SBINDIR@/swanctl --reload