Install systemd service file if systemd is available
This commit is contained in:
parent
7aa2d1ca49
commit
fc16b361ef
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = src man testing
|
SUBDIRS = src man init testing
|
||||||
|
|
||||||
if USE_SCRIPTS
|
if USE_SCRIPTS
|
||||||
SUBDIRS += scripts
|
SUBDIRS += scripts
|
||||||
|
|
|
@ -43,6 +43,13 @@ ARG_WITH_SUBST([routing-table-prio], [220], [set priority for IPsec routing tabl
|
||||||
ARG_WITH_SET([capabilities], [no], [set capability dropping library. Currently supported values are "libcap" and "native"])
|
ARG_WITH_SET([capabilities], [no], [set capability dropping library. Currently supported values are "libcap" and "native"])
|
||||||
ARG_WITH_SET([mpz_powm_sec], [yes], [use the more side-channel resistant mpz_powm_sec in libgmp, if available])
|
ARG_WITH_SET([mpz_powm_sec], [yes], [use the more side-channel resistant mpz_powm_sec in libgmp, if available])
|
||||||
|
|
||||||
|
if test -n "$PKG_CONFIG"; then
|
||||||
|
systemdsystemunitdir_default=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
|
||||||
|
fi
|
||||||
|
ARG_WITH_SET([systemdsystemunitdir], [$systemdsystemunitdir_default], [directory for systemd service files])
|
||||||
|
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno])
|
||||||
|
AC_SUBST(systemdsystemunitdir)
|
||||||
|
|
||||||
AC_ARG_WITH(
|
AC_ARG_WITH(
|
||||||
[xauth-module],
|
[xauth-module],
|
||||||
AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
|
AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
|
||||||
|
@ -957,6 +964,8 @@ dnl ==============================
|
||||||
AC_OUTPUT(
|
AC_OUTPUT(
|
||||||
Makefile
|
Makefile
|
||||||
man/Makefile
|
man/Makefile
|
||||||
|
init/Makefile
|
||||||
|
init/systemd/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/include/Makefile
|
src/include/Makefile
|
||||||
src/libstrongswan/Makefile
|
src/libstrongswan/Makefile
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
SUBDIRS =
|
||||||
|
|
||||||
|
if HAVE_SYSTEMD
|
||||||
|
SUBDIRS += systemd
|
||||||
|
endif
|
|
@ -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 > $@
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=strongSwan IPsec
|
||||||
|
After=syslog.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=@SBINDIR@/ipsec start --nofork
|
||||||
|
StandardOutput=syslog
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue