mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #989 from pi-hole/APIresolveclientsandupstream
Implement backend for AdminLTE/#253
This commit is contained in:
commit
3bc5d1bae0
1 changed files with 15 additions and 0 deletions
|
@ -215,6 +215,20 @@ SetDNSDomainName(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResolutionSettings() {
|
||||||
|
|
||||||
|
typ=${args[2]}
|
||||||
|
state=${args[3]}
|
||||||
|
|
||||||
|
if [[ "${typ}" == "forward" ]]; then
|
||||||
|
sed -i.bak '/API_GET_UPSTREAM_DNS_HOSTNAME/d;' /etc/pihole/setupVars.conf
|
||||||
|
echo "API_GET_UPSTREAM_DNS_HOSTNAME=${state}" >> /etc/pihole/setupVars.conf
|
||||||
|
elif [[ "${typ}" == "clients" ]]; then
|
||||||
|
sed -i.bak '/API_GET_CLIENT_HOSTNAME/d;' /etc/pihole/setupVars.conf
|
||||||
|
echo "API_GET_CLIENT_HOSTNAME=${state}" >> /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;;
|
||||||
|
@ -231,6 +245,7 @@ case "${args[1]}" in
|
||||||
"layout" ) SetWebUILayout;;
|
"layout" ) SetWebUILayout;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
"domainname" ) SetDNSDomainName;;
|
"domainname" ) SetDNSDomainName;;
|
||||||
|
"resolve" ) ResolutionSettings;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue