Do not delete the setting before sourcing the file :}
Signed-off-by: Adam Hill <adam@diginc.us>
This commit is contained in:
parent
f8d37693ed
commit
41b1d04100
|
@ -27,11 +27,12 @@ prepare_configs() {
|
||||||
# If the setup variable file exists,
|
# If the setup variable file exists,
|
||||||
if [[ -e "${setupVars}" ]]; then
|
if [[ -e "${setupVars}" ]]; then
|
||||||
# update the variables in the file
|
# update the variables in the file
|
||||||
sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;/INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
|
|
||||||
local USERWEBPASSWORD="${WEBPASSWORD}"
|
local USERWEBPASSWORD="${WEBPASSWORD}"
|
||||||
. "${setupVars}"
|
. "${setupVars}"
|
||||||
# Stash and pop the user password to avoid setting the password to the hashed setupVar variable
|
# Stash and pop the user password to avoid setting the password to the hashed setupVar variable
|
||||||
WEBPASSWORD="${USERWEBPASSWORD}"
|
WEBPASSWORD="${USERWEBPASSWORD}"
|
||||||
|
# Clean up old before re-writing the required setupVars
|
||||||
|
sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;/INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
|
||||||
fi
|
fi
|
||||||
# echo the information to the user
|
# echo the information to the user
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue