diff --git a/packages/debian/configure b/packages/debian/configure index cfe9fcb..6cd6133 100755 --- a/packages/debian/configure +++ b/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/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" ;; diff --git a/packages/debian/configure.in b/packages/debian/configure.in index 4eb56a5..168d57a 100644 --- a/packages/debian/configure.in +++ b/packages/debian/configure.in @@ -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 diff --git a/packages/etc/systemd/system/edge@.service.in b/packages/etc/systemd/system/edge@.service.in new file mode 100644 index 0000000..42516c5 --- /dev/null +++ b/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= diff --git a/packages/rpm/configure b/packages/rpm/configure index 061a2e5..2e1be98 100755 --- a/packages/rpm/configure +++ b/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/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" ;; diff --git a/packages/rpm/configure.in b/packages/rpm/configure.in index 9e274be..cddb0b4 100644 --- a/packages/rpm/configure.in +++ b/packages/rpm/configure.in @@ -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 diff --git a/packages/rpm/n2n.spec.in b/packages/rpm/n2n.spec.in index be877d2..e9dab7c 100644 --- a/packages/rpm/n2n.spec.in +++ b/packages/rpm/n2n.spec.in @@ -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