Skip to content
Snippets Groups Projects
Commit 572d17d0 authored by GoliathLabs's avatar GoliathLabs
Browse files

Merge branch 'master' of https://github.com/ffggrz/ext-respondd

parents aca22edd 5bfa760d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* lsb_release * lsb_release
* ethtool * ethtool
* python3.3 * python3 (>= 3.3)
* python3-netifaces * python3-netifaces
* batman-adv * batman-adv
...@@ -15,36 +15,46 @@ ...@@ -15,36 +15,46 @@
## Setup ## Setup
### Debian-Dependencies ### Debian-Dependencies
``` ```sh
apt-get install python3-netifaces ethtool lsb-release apt-get install python3-netifaces ethtool lsb-release
``` ```
### config.json ### config.json
Start parameter for ext-respondd. Start parameter for ext-respondd.
Copy `config.json.example` to `config.json` and change it to match your server configuration. Copy `config.json.example` to `config.json` and change it to match your server configuration.
(`cp config.json.example config.json`)
* `batman` (string) (Optional: default bat0) * `"addr"` (`str` / _default:_ `ff05::2:1001`)
* `bridge` (string) (Optional: default br-client) - address to listen to
* `mesh-wlan` (array of string) (Optional: Ad-Hoc batman-Mesh) * `"port"` (`str` / _default:_ `1001`)
* `mesh-vpn` (array of string) (Optional: fastd, GRE, L2TP batman-Mesh) - port to listen to
* `fastd_socket` (string) (Optional: needed for uplink-flag) * `"batman"` (`str` / _default:_ `bat0`)
* `rate_limit` (integer) (Optional: limit incoming requests per minutes) - batman-adv interface
* `rate_limit_burst` (integer) (Optional: allow burst requests) * `"bridge"` (`str` / _default:_ `br-client`)
- client bridge
* `"mesh-wlan"` (`str[]`)
- ad hoc batman-mesh
* `"mesh-vpn"` (`str[]`)
- fastd, GRE, L2TP batman-Mesh
* `"fastd_socket"` (`str`)
- needed for uplink-flag
* `"rate_limit"` (`int` / _default:_ `30`)
- limit incoming requests per minutes
* `"rate_limit_burst"` (`int` / _default:_ `10`)
- allow burst requests
### alias.json ### alias.json
Aliases to overwrite the returned server data. Aliases to overwrite the returned server data.
Copy `alias.json.example` to `alias.json` and input e.g. owner information. Copy `alias.json.example` to `alias.json` and input e.g. owner information.
(`cp alias.json.example alias.json`)
The JSON content matches one block of the nodes.json, which is outputted by e.g. the [HopGlass-Server](https://github.com/hopglass/hopglass-server). The JSON content matches one block of the nodes.json, which is outputted by e.g. the [HopGlass-Server](https://github.com/hopglass/hopglass-server).
### ext-respondd.service ### ext-respondd.service
Register ext-respondd as a systemd service Register ext-respondd as a systemd service
``` ```sh
cp ext-respondd.service.example /lib/systemd/system/ext-respondd.service cp ext-respondd.service.example /lib/systemd/system/ext-respondd.service
! modify the path inside of the ext-respondd.service ! # modify the path inside of the ext-respondd.service if necessary
systemctl daemon-reload
systemctl enable ext-respondd systemctl enable ext-respondd
systemctl start ext-respondd systemctl start ext-respondd
``` ```
...@@ -57,5 +67,5 @@ Collecting data from respondd: ...@@ -57,5 +67,5 @@ Collecting data from respondd:
Respondd for servers: Respondd for servers:
* [ffho-respondd](https://github.com/FreifunkHochstift/ffho-respondd) from Freifunk Hochstift (fork of ext-respondd) * [ffho-respondd](https://github.com/FreifunkHochstift/ffho-respondd) from Freifunk Hochstift (fork of ext-respondd)
* [ffnord-alfred-announce](https://github.com/ffnord/ffnord-alfred-announce) from FreiFunkNord * [mesh-announce](https://github.com/ffnord/mesh-announce) from Freifunk Nord
* [py-respondd](https://github.com/descilla/py-respondd) * [py-respondd](https://github.com/descilla/py-respondd)
[Unit] [Unit]
Description=ext-respondd (respondd status for servers) Description=ext-respondd (respondd status for servers)
After=syslog.target network.target After=syslog.target network-online.target
[Service] [Service]
Type=simple Type=simple
......
...@@ -6,7 +6,7 @@ import sys ...@@ -6,7 +6,7 @@ import sys
def call(cmdnargs): def call(cmdnargs):
try: try:
output = subprocess.check_output(cmdnargs, stderr=subprocess.STDOUT) output = subprocess.check_output(cmdnargs, stderr=None)
lines = output.splitlines() lines = output.splitlines()
lines = [line.decode('utf-8') for line in lines] lines = [line.decode('utf-8') for line in lines]
except subprocess.CalledProcessError as err: except subprocess.CalledProcessError as err:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment