mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Capitalized variable names.
This commit is contained in:
parent
01bf1ae92d
commit
88c161769d
1 changed files with 5 additions and 5 deletions
|
@ -29,12 +29,12 @@ EOM
|
||||||
SetTemperatureUnit(){
|
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
|
if [[ $unit == "F" ]] ; then
|
||||||
echo "temperatureunit=F" >> /etc/pihole/setupVars.conf
|
echo "TEMPERATUREUNIT=F" >> /etc/pihole/setupVars.conf
|
||||||
else
|
else
|
||||||
echo "temperatureunit=C" >> /etc/pihole/setupVars.conf
|
echo "TEMPERATUREUNIT=C" >> /etc/pihole/setupVars.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,12 @@ SetTemperatureUnit(){
|
||||||
SetWebPassword(){
|
SetWebPassword(){
|
||||||
|
|
||||||
# Remove password from file (create backup setupVars.conf.bak)
|
# Remove password from file (create backup setupVars.conf.bak)
|
||||||
sed -i.bak '/webpassword/d' /etc/pihole/setupVars.conf
|
sed -i.bak '/WEBPASSWORD/d' /etc/pihole/setupVars.conf
|
||||||
# Compute password hash twice to avoid rainbow table vulnerability
|
# Compute password hash twice to avoid rainbow table vulnerability
|
||||||
hash=$(echo -n ${args[2]} | sha256sum | sed 's/\s.*$//')
|
hash=$(echo -n ${args[2]} | sha256sum | sed 's/\s.*$//')
|
||||||
hash=$(echo -n ${hash} | sha256sum | sed 's/\s.*$//')
|
hash=$(echo -n ${hash} | sha256sum | sed 's/\s.*$//')
|
||||||
# Save hash to file
|
# Save hash to file
|
||||||
echo "webpassword=${hash}" >> /etc/pihole/setupVars.conf
|
echo "WEBPASSWORD=${hash}" >> /etc/pihole/setupVars.conf
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue