From patchwork Sun Feb 11 08:33:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Disable VPN if not in use From: Christian Dresel X-Patchwork-Id: 776 Message-Id: <20180211083336.8978-1-fff@chrisi01.de> To: franken-dev@freifunk.net Date: Sun, 11 Feb 2018 09:33:36 +0100 fixes 72 Signed-off-by: Christian Dresel Signed-off-by: Christian Dresel Reviewed-by: Robert Langhammer --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 2 ++ src/packages/fff/fff-vpn-select/files/usr/sbin/disable-vpn | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100755 src/packages/fff/fff-vpn-select/files/usr/sbin/disable-vpn diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index cf79b42..1831454 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -279,6 +279,8 @@ if [ -s "$hoodfile" ]; then if hasInternet ; then sh /usr/sbin/vpn-select + else + sh /usr/sbin/disable-vpn fi # now we load the prefix from the hoodfile and set this to br-mesh diff --git a/src/packages/fff/fff-vpn-select/files/usr/sbin/disable-vpn b/src/packages/fff/fff-vpn-select/files/usr/sbin/disable-vpn new file mode 100755 index 0000000..9d7fd9a --- /dev/null +++ b/src/packages/fff/fff-vpn-select/files/usr/sbin/disable-vpn @@ -0,0 +1,7 @@ +#!/bin/sh + +>/etc/config/tunneldigger +rm /tmp/fastd_fff_peers/* +/etc/init.d/fastd stop +/etc/init.d/tunneldigger stop +