mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Merge pull request #991 from pi-hole/webUIprivacymode
Backend for privacyMode on webUI
This commit is contained in:
commit
6abd6d8879
@ -216,6 +216,18 @@ 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
|
||||||
|
}
|
||||||
|
|
||||||
ResolutionSettings() {
|
ResolutionSettings() {
|
||||||
|
|
||||||
typ=${args[2]}
|
typ=${args[2]}
|
||||||
@ -246,6 +258,7 @@ case "${args[1]}" in
|
|||||||
"layout" ) SetWebUILayout;;
|
"layout" ) SetWebUILayout;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
"domainname" ) SetDNSDomainName;;
|
"domainname" ) SetDNSDomainName;;
|
||||||
|
"privacymode" ) SetPrivacyMode;;
|
||||||
"resolve" ) ResolutionSettings;;
|
"resolve" ) ResolutionSettings;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user