Parcourir la source

Only append to firewall list if needed

Bob Mottram il y a 7 ans
Parent
révision
e6e7711f65
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3
    1
      src/freedombone-utils-firewall

+ 3
- 1
src/freedombone-utils-firewall Voir le fichier

@@ -146,7 +146,9 @@ function firewall_enable_vpn {
146 146
     iptables -A OUTPUT -o tun+ -j ACCEPT
147 147
     save_firewall_settings
148 148
 
149
-    echo "VPN=1194" >> $FIREWALL_CONFIG
149
+    if ! grep -q "VPN=" $FIREWALL_CONFIG; then
150
+        echo "VPN=1194" >> $FIREWALL_CONFIG
151
+    fi
150 152
 }
151 153
 
152 154
 function configure_firewall {