ソースを参照

Only append to firewall list if needed

Bob Mottram 7 年 前
コミット
e6e7711f65
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 3
    1
      src/freedombone-utils-firewall

+ 3
- 1
src/freedombone-utils-firewall ファイルの表示

@@ -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 {