Add n2n-ntopng to bind the services lifetimes

This commit is contained in:
emanuele-f 2018-12-12 16:02:41 +01:00
parent 55d5392cd2
commit 3bd4e2c335
4 changed files with 19 additions and 0 deletions

View File

@ -39,6 +39,7 @@ AC_CONFIG_FILES(debian/control)
AC_CONFIG_FILES(debian/rules)
AC_CONFIG_FILES(../etc/systemd/system/edge.service)
AC_CONFIG_FILES(../etc/systemd/system/edge@.service)
AC_CONFIG_FILES(../etc/systemd/system/edge-ntopng@.service)
AC_CONFIG_FILES(../etc/systemd/system/supernode.service)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT

View File

@ -0,0 +1,16 @@
[Unit]
Description=n2n edge process, on %I
After=network.target syslog.target
Wants=
BindsTo=ntopng.service
[Service]
Type=simple
ExecStartPre=
ExecStart=/usr/sbin/edge /etc/n2n/edge-%i.conf -f
Restart=on-abnormal
RestartSec=5
[Install]
WantedBy=ntopng.service
Alias=

View File

@ -38,6 +38,7 @@ AC_SUBST(REVISION)
AC_CONFIG_FILES(n2n.spec)
AC_CONFIG_FILES(../etc/systemd/system/edge.service)
AC_CONFIG_FILES(../etc/systemd/system/edge@.service)
AC_CONFIG_FILES(../etc/systemd/system/edge-ntopng@.service)
AC_CONFIG_FILES(../etc/systemd/system/supernode.service)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT

View File

@ -48,6 +48,7 @@ rm -fr $RPM_BUILD_ROOT
/usr/share/man/man8/edge.8.gz
/usr/lib/systemd/system/edge.service
/usr/lib/systemd/system/edge@.service
/usr/lib/systemd/system/edge-ntopng@.service
/usr/lib/systemd/system/supernode.service
%config(noreplace) /etc/n2n/supernode.conf.sample
%config(noreplace) /etc/n2n/edge.conf.sample