mirror of https://github.com/ntop/n2n.git
Logan oos Even
4 years ago
committed by
GitHub
4 changed files with 131 additions and 116 deletions
@ -0,0 +1,73 @@ |
|||
# Configuration Files |
|||
|
|||
To help deployment of locally different configurations, n2n supports the use of configuration files for `edge` and `supernode`. |
|||
|
|||
They are plain text files and contain the desired command line options, **one per line**. |
|||
|
|||
The exemplary command line |
|||
|
|||
```bash |
|||
sudo edge -c mynetwork -k mysecretpass -a 192.168.100.1 -f -l supernode.ntop.org:7777 |
|||
``` |
|||
|
|||
translates into the following `edge.conf` file: |
|||
|
|||
``` |
|||
-c mynetwork |
|||
-k mysecretpass |
|||
-a 192.168.100.1 |
|||
-f |
|||
-l supernode.ntop.org:7777 |
|||
``` |
|||
|
|||
which can be loaded by |
|||
|
|||
``` |
|||
sudo ./edge edge.conf |
|||
``` |
|||
|
|||
The `.conf` file syntax also allows `=` between parameter and its option: |
|||
|
|||
``` |
|||
-c=mynetwork |
|||
-k=mysecretpass |
|||
-a=192.168.100.1 |
|||
-f |
|||
-l=supernode.ntop.org:7777 |
|||
``` |
|||
|
|||
When used with `=`, there is no whitespace allowed between parameter, delimter (`=`), and option. So, do **not** put `-c = mynetwork` – it is required to be `-c=mynetwork`. |
|||
|
|||
Comment lines starting with a hash '#' are ignored. |
|||
|
|||
``` |
|||
# automated edge configuration |
|||
# created by bot7 |
|||
# on April 31, 2038 – 1800Z |
|||
-c mynetwork |
|||
-k mysecretpass |
|||
-a 192.168.100.1 |
|||
-f |
|||
# --- supernode section --- |
|||
-l supernode.ntop.org:7777 |
|||
``` |
|||
|
|||
Long options can be used as well. Please note the double minus/dash character `--`, just like on command line: |
|||
|
|||
``` |
|||
# automated edge configuration |
|||
# created by bot7 |
|||
# on April 31, 2038 – 1800Z |
|||
--community mynetwork |
|||
-k mysecretpass |
|||
-a 192.168.100.1 |
|||
-f |
|||
# --- supernode section --- |
|||
-l supernode.ntop.org:7777 |
|||
``` |
|||
|
|||
If using a configuration file, its filename needs to be supplied as first parameter to `edge` or `supernode`. If required, additional command line parameters can be supplied afterwards: |
|||
|
|||
``` |
|||
sudo edge edge.conf -A5 |
|||
``` |
Loading…
Reference in new issue