From patchwork Sat Nov 11 08:06:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: stop and remove fastd and tunneldigger config if no internet From: Christian Dresel X-Patchwork-Id: 674 Message-Id: <20171111080641.13279-1-fff@chrisi01.de> To: franken-dev@freifunk.net Date: Sat, 11 Nov 2017 09:06:41 +0100 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