diff --git a/packages/debian/debian/README b/packages/debian/debian/README index c0e5203..8d88f8d 100644 --- a/packages/debian/debian/README +++ b/packages/debian/debian/README @@ -1,2 +1,2 @@ This directory contains the files needed to build the package -named 'ntopng' for the Debian GNU/Linux distribution. +named 'n2n' for the Debian GNU/Linux distribution. diff --git a/packages/debian/debian/conffiles b/packages/debian/debian/conffiles index e69de29..e2ec868 100644 --- a/packages/debian/debian/conffiles +++ b/packages/debian/debian/conffiles @@ -0,0 +1,2 @@ +/etc/n2n/edge.conf +/etc/n2n/supernode.conf diff --git a/packages/debian/debian/files.in b/packages/debian/debian/files.in index 45e26aa..b73ea13 100644 --- a/packages/debian/debian/files.in +++ b/packages/debian/debian/files.in @@ -1 +1 @@ -ntopng_@N2N_VERS@_@EXTN@.deb free optional +n2n_@N2N_VERS@_@EXTN@.deb free optional diff --git a/packages/debian/debian/postrm b/packages/debian/debian/postrm index a5b2191..ef799a3 100644 --- a/packages/debian/debian/postrm +++ b/packages/debian/debian/postrm @@ -2,12 +2,10 @@ set -e -case "$1" in - purge|remove) - if [ -f /etc/init.d/ntopng ]; then - update-rc.d ntopng remove >/dev/null - fi - ;; -esac +#case "$1" in +# purge|remove) +# +# ;; +#esac exit 0 diff --git a/packages/debian/debian/templates b/packages/debian/debian/templates index 87615b8..4f35407 100644 --- a/packages/debian/debian/templates +++ b/packages/debian/debian/templates @@ -1,4 +1,4 @@ -Template: ntopng/license_expired_continue_installation +Template: n2n/license_expired_continue_installation Type: boolean Default: true Description: Do you want to continue with the installation? diff --git a/packages/etc/n2n/edge.conf b/packages/etc/n2n/edge.conf new file mode 100644 index 0000000..8075f46 --- /dev/null +++ b/packages/etc/n2n/edge.conf @@ -0,0 +1,41 @@ +# +# The configuration file is similar to the command line, with one option per line. An equal +# sign '=' should be used between key and value. Example: -c=mynetwork or --community=mynetwork +# This file contains a basic configuration example, please refer to the help (-h) for the full +# list of available options. +# +# -d|--tun-device +# Specifies the name of the TUN interface. +# +# -d=n2n0 +# +# -c|--community +# Specifies the n2n community name the edge belongs to. +# +# -c=mynetwork +# +# -k +# Sets the encryption key (ASCII). The environment variable N2N_KEY= can also be used. +# +# -k=mypassword +# +# -m +# Specified the MAC address for the TAP interface (random otherwise). +# +# -m=DE:AD:BE:EF:99:99 +# +# -a +# Sets the interface address. For DHCP use '-r -a dhcp:0.0.0.0'. +# +# -a=1.2.3.4 +# +# -p +# Sets the local UDP port to a fixed port. +# +# -p=50001 +# +# -l|--supernode-list +# Specifies the supernode IP and port. +# +# -l=7.8.9.0:7777 +# diff --git a/packages/etc/n2n/supernode.conf b/packages/etc/n2n/supernode.conf new file mode 100644 index 0000000..0ef798d --- /dev/null +++ b/packages/etc/n2n/supernode.conf @@ -0,0 +1,11 @@ +# +# The configuration file is similar to the command line, with one option per line. An equal +# sign '=' should be used between key and value. Example: -l=7777 or --local-port=7777 +# This file contains a basic configuration example, please refer to the help (-h) for the full +# list of available options. +# +# -l|--local-port +# Sets the UDP listening port. +# +# -l=7777 +# diff --git a/packages/etc/systemd/system/edge.service.in b/packages/etc/systemd/system/edge.service.in index ceee170..c6c1867 100644 --- a/packages/etc/systemd/system/edge.service.in +++ b/packages/etc/systemd/system/edge.service.in @@ -6,7 +6,7 @@ Wants= [Service] Type=simple ExecStartPre= -ExecStart=/usr/sbin/edge -d n2n0 -c mynetwork -k mypassword -m DE:AD:BE:EF:99:99 -a 1.2.3.4 -p 50001 -l 7.8.9.0:7777 -f +ExecStart=/usr/sbin/edge /etc/n2n/edge.conf -f Restart=on-abnormal RestartSec=5 diff --git a/packages/etc/systemd/system/supernode.service.in b/packages/etc/systemd/system/supernode.service.in index ca536cf..9bf2653 100644 --- a/packages/etc/systemd/system/supernode.service.in +++ b/packages/etc/systemd/system/supernode.service.in @@ -6,7 +6,7 @@ Wants= [Service] Type=simple ExecStartPre= -ExecStart=/usr/sbin/supernode -l 7777 +ExecStart=/usr/sbin/supernode /etc/n2n/supernode.conf -f Restart=on-abnormal RestartSec=5