aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-03-28 20:04:00 +0200
committerMartin Willi <martin@revosec.ch>2011-03-29 09:27:54 +0200
commitfc16b361ef5290510fe92f17b8f821ea809d7604 (patch)
treea5f9ddb1aa25bb249f5e82e3580c588d6220f8db /init
parent7aa2d1ca49c5701bb9417f8a9c1ccd7f7cbea537 (diff)
downloadstrongswan-fc16b361ef5290510fe92f17b8f821ea809d7604.tar.bz2
strongswan-fc16b361ef5290510fe92f17b8f821ea809d7604.tar.xz
Install systemd service file if systemd is available
Diffstat (limited to 'init')
-rw-r--r--init/Makefile.am6
-rw-r--r--init/systemd/Makefile.am8
-rw-r--r--init/systemd/strongswan.service.in10
3 files changed, 24 insertions, 0 deletions
diff --git a/init/Makefile.am b/init/Makefile.am
new file mode 100644
index 000000000..69439a10a
--- /dev/null
+++ b/init/Makefile.am
@@ -0,0 +1,6 @@
+
+SUBDIRS =
+
+if HAVE_SYSTEMD
+ SUBDIRS += systemd
+endif
diff --git a/init/systemd/Makefile.am b/init/systemd/Makefile.am
new file mode 100644
index 000000000..e2bbfc451
--- /dev/null
+++ b/init/systemd/Makefile.am
@@ -0,0 +1,8 @@
+
+EXTRA_DIST = strongswan.service.in
+CLEANFILES = strongswan.service
+
+systemdsystemunit_DATA = strongswan.service
+
+strongswan.service : strongswan.service.in
+ sed -e "s:@SBINDIR@:$(sbindir):" $(srcdir)/$@.in > $@
diff --git a/init/systemd/strongswan.service.in b/init/systemd/strongswan.service.in
new file mode 100644
index 000000000..e8dc5e819
--- /dev/null
+++ b/init/systemd/strongswan.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=strongSwan IPsec
+After=syslog.target
+
+[Service]
+ExecStart=@SBINDIR@/ipsec start --nofork
+StandardOutput=syslog
+
+[Install]
+WantedBy=multi-user.target