Only append to firewall list if needed

This commit is contained in:
Bob Mottram 2017-09-25 17:11:18 +01:00
parent e9c47c397e
commit e6e7711f65
1 changed files with 3 additions and 1 deletions

View File

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