From da363070c7770f738c18c13120828edf722f149c Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 20 Dec 2016 12:21:08 +0100 Subject: [PATCH 1/2] Added Kelvin --- advanced/Scripts/webpage.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 6251b158..6b54abb7 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -31,11 +31,7 @@ SetTemperatureUnit(){ # Remove setting from file (create backup setupVars.conf.bak) sed -i.bak '/TEMPERATUREUNIT/d' /etc/pihole/setupVars.conf # Save setting to file - if [[ $unit == "F" ]] ; then - echo "TEMPERATUREUNIT=F" >> /etc/pihole/setupVars.conf - else - echo "TEMPERATUREUNIT=C" >> /etc/pihole/setupVars.conf - fi + echo "TEMPERATUREUNIT=${unit}" >> /etc/pihole/setupVars.conf } @@ -222,6 +218,7 @@ case "${args[1]}" in "-p" | "password" ) SetWebPassword;; "-c" | "celsius" ) unit="C"; SetTemperatureUnit;; "-f" | "fahrenheit" ) unit="F"; SetTemperatureUnit;; + "-k" | "kelvin" ) unit="K"; SetTemperatureUnit;; "setdns" ) SetDNSServers;; "setexcludedomains" ) SetExcludeDomains;; "setexcludeclients" ) SetExcludeClients;; From ee8f29d178ef18d68057564af71f4ab1da45a3cc Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 20 Dec 2016 16:28:28 +0100 Subject: [PATCH 2/2] Fixed typo, extended help text --- advanced/Scripts/webpage.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 6b54abb7..07706346 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -19,8 +19,9 @@ helpFunc() { ::: ::: Options: ::: -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 +::: -k, kelvin Set Kelvin temperature unit ::: -h, --help Show this help dialog EOM exit 0