|
|
|
@ -51,10 +51,12 @@ else |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Replace the whole line |
|
|
|
|
# If DNS_ONLY is true make sure is commented, else make sure is uncommented |
|
|
|
|
if [[ "$DNS_ONLY" = 'y' ]]; then |
|
|
|
|
sed -i 's/#push "redirect-gateway def1 bypass-dhcp"/push "redirect-gateway def1 bypass-dhcp"/g' ${OPENVPN_CONFIG_FILE} |
|
|
|
|
sed -i '/push "redirect-gateway def1 bypass-dhcp"/c\#push "redirect-gateway def1 bypass-dhcp"' ${OPENVPN_CONFIG_FILE} |
|
|
|
|
else |
|
|
|
|
sed -i 's/push "redirect-gateway def1 bypass-dhcp"/push "redirect-gateway def1 bypass-dhcp"/g' ${OPENVPN_CONFIG_FILE} |
|
|
|
|
sed -i '/push "redirect-gateway def1 bypass-dhcp"/c\push "redirect-gateway def1 bypass-dhcp"' ${OPENVPN_CONFIG_FILE} |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|