[PATCH] stop and remove fastd and tunneldigger config if no internet

Christian Dresel fff at chrisi01.de
Sa Nov 11 09:06:41 CET 2017


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 <fff at chrisi01.de>
---
 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
-- 
2.11.0



Mehr Informationen über die Mailingliste franken-dev