diff options
-rw-r--r-- | configure.ac | 1 | ||||
-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 |
5 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 43556c54f..39612704c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 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 |