diff options
author | Martin Willi <martin@revosec.ch> | 2014-09-11 16:23:53 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-09-22 14:19:38 +0200 |
commit | 00971418583c39edee8c9c5174940fbd20c11ecc (patch) | |
tree | 0623ce24d485f0efc5c0d3be2eda638baceb121f /init | |
parent | b2f76c514d98217b28c700ec7a32b2bc66269389 (diff) | |
download | strongswan-00971418583c39edee8c9c5174940fbd20c11ecc.tar.bz2 strongswan-00971418583c39edee8c9c5174940fbd20c11ecc.tar.xz |
init: Provide a service file for charon-systemd using swanctl
Diffstat (limited to 'init')
-rw-r--r-- | init/Makefile.am | 6 | ||||
-rw-r--r-- | init/systemd-swanctl/.gitignore | 1 | ||||
-rw-r--r-- | init/systemd-swanctl/Makefile.am | 11 | ||||
-rw-r--r-- | init/systemd-swanctl/strongswan-swanctl.service.in | 9 |
4 files changed, 27 insertions, 0 deletions
diff --git a/init/Makefile.am b/init/Makefile.am index 83faf9d43..a72706c99 100644 --- a/init/Makefile.am +++ b/init/Makefile.am @@ -4,3 +4,9 @@ SUBDIRS = if USE_LEGACY_SYSTEMD SUBDIRS += systemd endif + +if USE_SYSTEMD +if USE_SWANCTL + SUBDIRS += systemd-swanctl +endif +endif diff --git a/init/systemd-swanctl/.gitignore b/init/systemd-swanctl/.gitignore new file mode 100644 index 000000000..b973780a9 --- /dev/null +++ b/init/systemd-swanctl/.gitignore @@ -0,0 +1 @@ +strongswan-swanctl.service diff --git a/init/systemd-swanctl/Makefile.am b/init/systemd-swanctl/Makefile.am new file mode 100644 index 000000000..eee30acc8 --- /dev/null +++ b/init/systemd-swanctl/Makefile.am @@ -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 > $@ diff --git a/init/systemd-swanctl/strongswan-swanctl.service.in b/init/systemd-swanctl/strongswan-swanctl.service.in new file mode 100644 index 000000000..818d352d5 --- /dev/null +++ b/init/systemd-swanctl/strongswan-swanctl.service.in @@ -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 |