Add systemd service files for nextepc daemons

This commit is contained in:
Harald Welte 2017-10-17 22:06:38 +02:00
parent 4bce6df238
commit ae6f1001f8
15 changed files with 110 additions and 2 deletions

View File

@ -2,7 +2,7 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib src test
SUBDIRS = lib src test support/systemd
bin_PROGRAMS = nextepc-mmed nextepc-hssd nextepc-sgwd nextepc-pgwd nextepc-pcrfd nextepc-epcd

View File

@ -186,6 +186,29 @@ adl_RECURSIVE_EVAL(["${sysconfdir}"], [SYSCONF_DIR])
AC_SUBST(LIB_DIR)
AC_SUBST(SYSCONF_DIR)
AC_SUBST(systemd_unit_dir)
AC_ARG_WITH(
systemd-unit-dir,
AS_HELP_STRING(
[--with-systemdsystemunitdir=DIR],
[systemd unit directory @<:@SYSTEMD_UNIT_DIR@:>@
Defaults to the correct value for debian /etc/systemd/system/]
),
[
systemd_unit_dir="$withval"
],
[
# default to the systemd admin unit directory
which pkg-config
pkg_config_exists=$?
if test x"$pkg_config_exists" = x"0"; then
systemd_unit_dir=`pkg-config systemd --variable=systemdsystemunitdir`
else
systemd_unit_dir="/etc/systemd/system/"
fi
]
)
##################################
#### Checks for header files. ####
##################################
@ -380,6 +403,7 @@ AC_CONFIG_FILES([support/freeDiameter/hss.conf])
AC_CONFIG_FILES([support/freeDiameter/pgw.conf])
AC_CONFIG_FILES([support/freeDiameter/pcrf.conf])
#AC_CONFIG_FILES([support/freeDiameter/dict_legacy_xml.conf])
AC_CONFIG_FILES([support/systemd/Makefile])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

1
debian/control vendored
View File

@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 9),
pkg-config,
git,
dh-autoreconf,
dh-systemd,
flex,
bison,
libsctp-dev,

View File

@ -2,3 +2,4 @@ usr/bin/nextepc-hssd
etc/freeDiameter/hss.conf
etc/freeDiameter/hss.cert.pem
etc/freeDiameter/hss.key.pem
lib/systemd/system/nextepc-hssd.service

View File

@ -2,3 +2,4 @@ usr/bin/nextepc-mmed
etc/freeDiameter/mme.conf
etc/freeDiameter/mme.cert.pem
etc/freeDiameter/mme.key.pem
lib/systemd/system/nextepc-mmed.service

View File

@ -2,3 +2,4 @@ usr/bin/nextepc-pcrfd
etc/freeDiameter/pcrf.conf
etc/freeDiameter/pcrf.cert.pem
etc/freeDiameter/pcrf.key.pem
lib/systemd/system/nextepc-pcrfd.service

View File

@ -2,3 +2,4 @@ usr/bin/nextepc-pgwd
etc/freeDiameter/pgw.conf
etc/freeDiameter/pgw.cert.pem
etc/freeDiameter/pgw.key.pem
lib/systemd/system/nextepc-pgwd.service

View File

@ -1 +1,2 @@
usr/bin/nextepc-sgwd
lib/systemd/system/nextepc-sgwd.service

2
debian/rules vendored
View File

@ -12,7 +12,7 @@ VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --with autoreconf
dh $@ --with autoreconf --with systemd
override_dh_auto_test:
# skip 'make test' as currently it expects config/log in system paths

View File

@ -0,0 +1,13 @@
unitfiles = \
nextepc-mmed.service \
nextepc-sgwd.service \
nextepc-pgwd.service \
nextepc-pcrfd.service \
nextepc-hssd.service \
$(NULL)
unitdir = ${systemd_unit_dir}
unit_DATA = $(unitfiles)
EXTRA_DIST = $(unitfiles)

View File

@ -0,0 +1,13 @@
[Unit]
Description=NextEPC HSS Daemon
After=networking.service
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/nextepc-hssd -f /etc/nextepc/hss.cfg
RestartSec=2
RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=NextEPC MME Daemon
After=networking.service
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/nextepc-mmed -f /etc/nextepc/mme.cfg
RestartSec=2
RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=NextEPC PCRF Daemon
After=networking.service
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/nextepc-pcrfd -f /etc/nextepc/pcrfd.cfg
RestartSec=2
RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=NextEPC S-GW Daemon
After=networking.service
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/nextepc-pgwd -f /etc/nextepc/pgw.cfg
RestartSec=2
RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=NextEPC S-GW Daemon
After=networking.service
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/nextepc-sgwd -f /etc/nextepc/sgw.cfg
RestartSec=2
RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target