Browse Source

Add support for multi-service n2n edge

E.g. systemctl start edge@n2n1 will read /etc/n2n/edge-n2n1.conf
pull/60/head
Emanuele Faranda 6 years ago
parent
commit
b84cedd8b8
  1. 3
      packages/debian/configure
  2. 1
      packages/debian/configure.in
  3. 15
      packages/etc/systemd/system/edge@.service.in
  4. 3
      packages/rpm/configure
  5. 1
      packages/rpm/configure.in
  6. 1
      packages/rpm/n2n.spec.in

3
packages/debian/configure

@ -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/edge@.service"
ac_config_files="$ac_config_files ../etc/systemd/system/supernode.service" ac_config_files="$ac_config_files ../etc/systemd/system/supernode.service"
ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files Makefile"
@ -2440,6 +2442,7 @@ do
"debian/control") CONFIG_FILES="$CONFIG_FILES debian/control" ;; "debian/control") CONFIG_FILES="$CONFIG_FILES debian/control" ;;
"debian/rules") CONFIG_FILES="$CONFIG_FILES debian/rules" ;; "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/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" ;; "../etc/systemd/system/supernode.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/supernode.service" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;

1
packages/debian/configure.in

@ -38,6 +38,7 @@ AC_CONFIG_FILES(debian/files)
AC_CONFIG_FILES(debian/control) AC_CONFIG_FILES(debian/control)
AC_CONFIG_FILES(debian/rules) 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@.service)
AC_CONFIG_FILES(../etc/systemd/system/supernode.service) AC_CONFIG_FILES(../etc/systemd/system/supernode.service)
AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(Makefile)
AC_OUTPUT AC_OUTPUT

15
packages/etc/systemd/system/edge@.service.in

@ -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
packages/rpm/configure

@ -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/edge@.service"
ac_config_files="$ac_config_files ../etc/systemd/system/supernode.service" ac_config_files="$ac_config_files ../etc/systemd/system/supernode.service"
ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files Makefile"
@ -2420,6 +2422,7 @@ do
case $ac_config_target in case $ac_config_target in
"n2n.spec") CONFIG_FILES="$CONFIG_FILES n2n.spec" ;; "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/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" ;; "../etc/systemd/system/supernode.service") CONFIG_FILES="$CONFIG_FILES ../etc/systemd/system/supernode.service" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;

1
packages/rpm/configure.in

@ -37,6 +37,7 @@ AC_SUBST(REVISION)
AC_CONFIG_FILES(n2n.spec) 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@.service)
AC_CONFIG_FILES(../etc/systemd/system/supernode.service) AC_CONFIG_FILES(../etc/systemd/system/supernode.service)
AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(Makefile)
AC_OUTPUT AC_OUTPUT

1
packages/rpm/n2n.spec.in

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

Loading…
Cancel
Save