mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 14:20:18 +00:00
commit
a9cb93d801
1 changed files with 4 additions and 6 deletions
|
@ -19,8 +19,9 @@ helpFunc() {
|
||||||
:::
|
:::
|
||||||
::: Options:
|
::: Options:
|
||||||
::: -p, password Set web interface password, an empty input will remove any previously set password
|
::: -p, password Set web interface password, an empty input will remove any previously set password
|
||||||
::: -c, celsius Set Celcius temperature unit
|
::: -c, celsius Set Celsius temperature unit
|
||||||
::: -f, fahrenheit Set Fahrenheit temperature unit
|
::: -f, fahrenheit Set Fahrenheit temperature unit
|
||||||
|
::: -k, kelvin Set Kelvin temperature unit
|
||||||
::: -h, --help Show this help dialog
|
::: -h, --help Show this help dialog
|
||||||
EOM
|
EOM
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -31,11 +32,7 @@ SetTemperatureUnit(){
|
||||||
# Remove setting from file (create backup setupVars.conf.bak)
|
# Remove setting from file (create backup setupVars.conf.bak)
|
||||||
sed -i.bak '/TEMPERATUREUNIT/d' /etc/pihole/setupVars.conf
|
sed -i.bak '/TEMPERATUREUNIT/d' /etc/pihole/setupVars.conf
|
||||||
# Save setting to file
|
# Save setting to file
|
||||||
if [[ $unit == "F" ]] ; then
|
echo "TEMPERATUREUNIT=${unit}" >> /etc/pihole/setupVars.conf
|
||||||
echo "TEMPERATUREUNIT=F" >> /etc/pihole/setupVars.conf
|
|
||||||
else
|
|
||||||
echo "TEMPERATUREUNIT=C" >> /etc/pihole/setupVars.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,6 +219,7 @@ case "${args[1]}" in
|
||||||
"-p" | "password" ) SetWebPassword;;
|
"-p" | "password" ) SetWebPassword;;
|
||||||
"-c" | "celsius" ) unit="C"; SetTemperatureUnit;;
|
"-c" | "celsius" ) unit="C"; SetTemperatureUnit;;
|
||||||
"-f" | "fahrenheit" ) unit="F"; SetTemperatureUnit;;
|
"-f" | "fahrenheit" ) unit="F"; SetTemperatureUnit;;
|
||||||
|
"-k" | "kelvin" ) unit="K"; SetTemperatureUnit;;
|
||||||
"setdns" ) SetDNSServers;;
|
"setdns" ) SetDNSServers;;
|
||||||
"setexcludedomains" ) SetExcludeDomains;;
|
"setexcludedomains" ) SetExcludeDomains;;
|
||||||
"setexcludeclients" ) SetExcludeClients;;
|
"setexcludeclients" ) SetExcludeClients;;
|
||||||
|
|
Loading…
Reference in a new issue