Add support for multi-service n2n edge

E.g. systemctl start edge@n2n1 will read /etc/n2n/edge-n2n1.conf
This commit is contained in:
Emanuele Faranda
2018-11-28 13:04:44 +01:00
parent 2e2654dd2a
commit b84cedd8b8
6 changed files with 24 additions and 0 deletions
+3
View File
@@ -1726,6 +1726,8 @@ ac_config_files="$ac_config_files debian/rules"
ac_config_files="$ac_config_files ../etc/systemd/system/edge.service"
ac_config_files="$ac_config_files ../etc/systemd/system/edge@.service"
ac_config_files="$ac_config_files ../etc/systemd/system/supernode.service"
ac_config_files="$ac_config_files Makefile"
@@ -2440,6 +2442,7 @@ do
"debian/control") CONFIG_FILES="$CONFIG_FILES debian/control" ;;
"debian/rules") CONFIG_FILES="$CONFIG_FILES debian/rules" ;;
"../etc/systemd/system/edge.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/edge.service" ;;
"../etc/systemd/system/edge@.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/edge@.service" ;;
"../etc/systemd/system/supernode.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/supernode.service" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+1
View File
@@ -38,6 +38,7 @@ AC_CONFIG_FILES(debian/files)
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/supernode.service)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
@@ -0,0 +1,15 @@
[Unit]
Description=n2n edge process, on %I
After=network.target syslog.target
Wants=
[Service]
Type=simple
ExecStartPre=
ExecStart=/usr/sbin/edge /etc/n2n/edge-%i.conf -f
Restart=on-abnormal
RestartSec=5
[Install]
WantedBy=multi-user.target
Alias=
+3
View File
@@ -1709,6 +1709,8 @@ ac_config_files="$ac_config_files n2n.spec"
ac_config_files="$ac_config_files ../etc/systemd/system/edge.service"
ac_config_files="$ac_config_files ../etc/systemd/system/edge@.service"
ac_config_files="$ac_config_files ../etc/systemd/system/supernode.service"
ac_config_files="$ac_config_files Makefile"
@@ -2420,6 +2422,7 @@ do
case $ac_config_target in
"n2n.spec") CONFIG_FILES="$CONFIG_FILES n2n.spec" ;;
"../etc/systemd/system/edge.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/edge.service" ;;
"../etc/systemd/system/edge@.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/edge@.service" ;;
"../etc/systemd/system/supernode.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/supernode.service" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+1
View File
@@ -37,6 +37,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/supernode.service)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
+1
View File
@@ -47,6 +47,7 @@ rm -fr $RPM_BUILD_ROOT
/usr/share/man/man1/supernode.1.gz
/usr/share/man/man8/edge.8.gz
/usr/lib/systemd/system/edge.service
/usr/lib/systemd/system/edge@.service
/usr/lib/systemd/system/supernode.service
%config(noreplace) /etc/n2n/supernode.conf
%config(noreplace) /etc/n2n/edge.conf