From patchwork Sat Nov 11 09:53:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: stop and remove fastd and tunneldigger config if no internet From: Adrian Schmutzler X-Patchwork-Id: 675 Message-Id: <9D76B56B-988F-4FF8-B560-EAE896112943@adrianschmutzler.de> To: Christian Dresel , franken-dev@freifunk.net Date: Sat, 11 Nov 2017 10:53:14 +0100 Hallo Christian, ich frage mich gerade folgendes: Wenn die Verbindung im Moment des Tests gerade gestört ist, schaltet das für 5 min effektiv Freifunk ab. Wie wahrscheinlich/häufig wäre das? (Ist der Gewinn durch den bugfix das wert?) Haben wir noch andere Alternativen? Konnte mich jetzt aber erstmal nur oberflächlich damit beschäftigen ... Grüße Adrian On November 11, 2017 9:06:41 AM GMT+01:00, Christian Dresel wrote: If we have no Internet, we don't need the config and we can stop fastd and tunneldigger. When we get Internet back, the vpn-select packages reload the config and start tunneldigger and fastd again Signed-off-by: Christian Dresel --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index ba34329..dd92a89 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -237,6 +237,12 @@ if [ -s "$hoodfile" ]; then if hasInternet ; then sh /usr/sbin/vpn-select + else + # remove old config + >/etc/config/tunneldigger + rm /tmp/fastd_fff_peers/* + /etc/init.d/fastd stop + /etc/init.d/tunneldigger stop fi # now we load the prefix from the hoodfile and set this to br-mesh