diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Makefile.am | 8 | ||||
-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 | ||||
-rw-r--r-- | init/systemd/.gitignore | 1 | ||||
-rw-r--r-- | init/systemd/strongswan.service.in | 2 |
6 files changed, 30 insertions, 2 deletions
diff --git a/init/Makefile.am b/init/Makefile.am index 69439a10a..a72706c99 100644 --- a/init/Makefile.am +++ b/init/Makefile.am @@ -1,6 +1,12 @@ SUBDIRS = -if HAVE_SYSTEMD +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 diff --git a/init/systemd/.gitignore b/init/systemd/.gitignore new file mode 100644 index 000000000..0b90b3694 --- /dev/null +++ b/init/systemd/.gitignore @@ -0,0 +1 @@ +strongswan.service diff --git a/init/systemd/strongswan.service.in b/init/systemd/strongswan.service.in index dee892e90..608078b1e 100644 --- a/init/systemd/strongswan.service.in +++ b/init/systemd/strongswan.service.in @@ -1,5 +1,5 @@ [Unit] -Description=strongSwan IPsec +Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf After=syslog.target [Service] |