mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Backend for privacyMode on webUI
This commit is contained in:
parent
10982a0f45
commit
7a243f890e
1 changed files with 14 additions and 0 deletions
|
@ -212,6 +212,19 @@ SetDNSDomainName(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetPrivacyMode(){
|
||||||
|
|
||||||
|
# Remove setting from file (create backup setupVars.conf.bak)
|
||||||
|
sed -i.bak '/API_PRIVACY_MODE/d' /etc/pihole/setupVars.conf
|
||||||
|
# Save setting to file
|
||||||
|
if [[ "${args[2]}" == "true" ]] ; then
|
||||||
|
echo "API_PRIVACY_MODE=true" >> /etc/pihole/setupVars.conf
|
||||||
|
else
|
||||||
|
echo "API_PRIVACY_MODE=false" >> /etc/pihole/setupVars.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
case "${args[1]}" in
|
case "${args[1]}" in
|
||||||
"-p" | "password" ) SetWebPassword;;
|
"-p" | "password" ) SetWebPassword;;
|
||||||
"-c" | "celsius" ) unit="C"; SetTemperatureUnit;;
|
"-c" | "celsius" ) unit="C"; SetTemperatureUnit;;
|
||||||
|
@ -227,6 +240,7 @@ case "${args[1]}" in
|
||||||
"layout" ) SetWebUILayout;;
|
"layout" ) SetWebUILayout;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
"domainname" ) SetDNSDomainName;;
|
"domainname" ) SetDNSDomainName;;
|
||||||
|
"privacymode" ) SetPrivacyMode;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue