mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-22 12:50:16 +00:00
Renamed pivpnDOMAIN to pivpnSEARCHDOMAIN
This commit is contained in:
parent
8ab71601ff
commit
34c10a81f3
2 changed files with 13 additions and 13 deletions
|
@ -1061,17 +1061,17 @@ validDomain(){
|
||||||
#This procedure allows a user to specify a custom search domain if they have one.
|
#This procedure allows a user to specify a custom search domain if they have one.
|
||||||
askCustomDomain(){
|
askCustomDomain(){
|
||||||
if [ "${runUnattended}" = 'true' ]; then
|
if [ "${runUnattended}" = 'true' ]; then
|
||||||
if [ -n "$pivpnDOMAIN" ]; then
|
if [ -n "$pivpnSEARCHDOMAIN" ]; then
|
||||||
if validDomain "$pivpnDOMAIN"; then
|
if validDomain "$pivpnSEARCHDOMAIN"; then
|
||||||
echo "::: Using custom domain $pivpnDOMAIN"
|
echo "::: Using custom domain $pivpnSEARCHDOMAIN"
|
||||||
else
|
else
|
||||||
echo "::: Custom domain $pivpnDOMAIN is not valid"
|
echo "::: Custom domain $pivpnSEARCHDOMAIN is not valid"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "::: Skipping custom domain"
|
echo "::: Skipping custom domain"
|
||||||
fi
|
fi
|
||||||
echo "pivpnDOMAIN=${pivpnDOMAIN}" >> /tmp/setupVars.conf
|
echo "pivpnSEARCHDOMAIN=${pivpnSEARCHDOMAIN}" >> /tmp/setupVars.conf
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1081,16 +1081,16 @@ askCustomDomain(){
|
||||||
|
|
||||||
until [[ $DomainSettingsCorrect = True ]]
|
until [[ $DomainSettingsCorrect = True ]]
|
||||||
do
|
do
|
||||||
if pivpnDOMAIN=$(whiptail --inputbox "Enter Custom Domain\nFormat: mydomain.com" ${r} ${c} --title "Custom Domain" 3>&1 1>&2 2>&3); then
|
if pivpnSEARCHDOMAIN=$(whiptail --inputbox "Enter Custom Domain\nFormat: mydomain.com" ${r} ${c} --title "Custom Domain" 3>&1 1>&2 2>&3); then
|
||||||
if validDomain "$pivpnDOMAIN"; then
|
if validDomain "$pivpnSEARCHDOMAIN"; then
|
||||||
if (whiptail --backtitle "Custom Search Domain" --title "Custom Search Domain" --yesno "Are these settings correct?\n Custom Search Domain: $pivpnDOMAIN" ${r} ${c}); then
|
if (whiptail --backtitle "Custom Search Domain" --title "Custom Search Domain" --yesno "Are these settings correct?\n Custom Search Domain: $pivpnSEARCHDOMAIN" ${r} ${c}); then
|
||||||
DomainSettingsCorrect=True
|
DomainSettingsCorrect=True
|
||||||
else
|
else
|
||||||
# If the settings are wrong, the loop continues
|
# If the settings are wrong, the loop continues
|
||||||
DomainSettingsCorrect=False
|
DomainSettingsCorrect=False
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
whiptail --msgbox --backtitle "Invalid Domain" --title "Invalid Domain" "Domain is invalid. Please try again.\n\n DOMAIN: $pivpnDOMAIN\n" ${r} ${c}
|
whiptail --msgbox --backtitle "Invalid Domain" --title "Invalid Domain" "Domain is invalid. Please try again.\n\n DOMAIN: $pivpnSEARCHDOMAIN\n" ${r} ${c}
|
||||||
DomainSettingsCorrect=False
|
DomainSettingsCorrect=False
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -1100,7 +1100,7 @@ askCustomDomain(){
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "pivpnDOMAIN=${pivpnDOMAIN}" >> /tmp/setupVars.conf
|
echo "pivpnSEARCHDOMAIN=${pivpnSEARCHDOMAIN}" >> /tmp/setupVars.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
askPublicIPOrDNS(){
|
askPublicIPOrDNS(){
|
||||||
|
@ -1313,8 +1313,8 @@ set_var EASYRSA_KEY_SIZE ${pivpnENCRYPT}" | $SUDO tee vars >/dev/null
|
||||||
$SUDO sed -i "s/proto udp/proto tcp/g" /etc/openvpn/server.conf
|
$SUDO sed -i "s/proto udp/proto tcp/g" /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$pivpnDOMAIN" ]; then
|
if [ -n "$pivpnSEARCHDOMAIN" ]; then
|
||||||
$SUDO sed -i "0,/\(.*dhcp-option.*\)/s//\push \"dhcp-option DOMAIN ${pivpnDOMAIN}\" \n&/" /etc/openvpn/server.conf
|
$SUDO sed -i "0,/\(.*dhcp-option.*\)/s//\push \"dhcp-option DOMAIN ${pivpnSEARCHDOMAIN}\" \n&/" /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# write out server certs to conf file
|
# write out server certs to conf file
|
||||||
|
|
|
@ -7,6 +7,6 @@ pivpnDNS1=8.8.8.8
|
||||||
pivpnDNS2=8.8.4.4
|
pivpnDNS2=8.8.4.4
|
||||||
pivpnHOST=pivpn.example.com
|
pivpnHOST=pivpn.example.com
|
||||||
pivpnENCRYPT=2048
|
pivpnENCRYPT=2048
|
||||||
pivpnDOMAIN=domain.example.com
|
pivpnSEARCHDOMAIN=searchdomain.example.com
|
||||||
DOWNLOAD_DH_PARAM=0
|
DOWNLOAD_DH_PARAM=0
|
||||||
UNATTUPG=1
|
UNATTUPG=1
|
||||||
|
|
Loading…
Reference in a new issue