Updated sed insertion to fix line overwrite

This commit is contained in:
Heidenreich 2019-03-11 11:22:31 -04:00
parent 76ae525c1d
commit ae934253f9

View file

@ -727,7 +727,7 @@ setCustomDomain() {
if (whiptail --backtitle "Custom Search Domain" --title "Custom Search Domain" --yesno "Are these settings correct?\n Custom Search Domain: $CUSTOMDomain" ${r} ${c}); then
DomainSettingsCorrect=True
$SUDO sed -i '0,/\(.*dhcp-option.*\)/s//\push "dhcp-option DOMAIN '${CUSTOMDomain}'" /' /etc/openvpn/server.conf
$SUDO sed -i '0,/\(.*dhcp-option.*\)/s//\push "dhcp-option DOMAIN '${CUSTOMDomain}'" \n&/' /etc/openvpn/server.conf
else
# If the settings are wrong, the loop continues