genconfig: Convert OVPN_ROUTES to array
* Convert to an array to simplify the code. * This breaks running `ovpn_genconfig` multiple times with the same route argument as the array will just grow. This needs to be fixed in the future. * Recommended way to work around this is to remove ovpn_env.sh.
This commit is contained in:
@ -21,8 +21,8 @@ fi
|
||||
if [ "$OVPN_DEFROUTE" != "0" ];then
|
||||
iptables -t nat -A POSTROUTING -s $OVPN_SERVER -o eth0 -j MASQUERADE
|
||||
|
||||
for i in ${OVPN_ROUTES[@]}; do
|
||||
iptables -t nat -A POSTROUTING -s $i -o eth0 -j MASQUERADE
|
||||
for i in "${OVPN_ROUTES[@]}"; do
|
||||
iptables -t nat -A POSTROUTING -s "$i" -o eth0 -j MASQUERADE
|
||||
done
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user