From e6e7711f65387bce7f598982c18f34cc203bf7a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 25 Sep 2017 17:11:18 +0100 Subject: [PATCH] Only append to firewall list if needed --- src/freedombone-utils-firewall | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-firewall b/src/freedombone-utils-firewall index 94f161f4..574faffa 100755 --- a/src/freedombone-utils-firewall +++ b/src/freedombone-utils-firewall @@ -146,7 +146,9 @@ function firewall_enable_vpn { iptables -A OUTPUT -o tun+ -j ACCEPT save_firewall_settings - echo "VPN=1194" >> $FIREWALL_CONFIG + if ! grep -q "VPN=" $FIREWALL_CONFIG; then + echo "VPN=1194" >> $FIREWALL_CONFIG + fi } function configure_firewall {