mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 02:22:24 +01:00
Move color defs above their use cases (#3082)
After this fix the UPS status color is displayed as intended.
This commit is contained in:
@@ -52,7 +52,12 @@ if [ "${PARAMETER_LIGHTNING}" == "none" ]; then
|
|||||||
lightning=""
|
lightning=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# set colors
|
||||||
|
color_red='\033[0;31m'
|
||||||
|
color_green='\033[0;32m'
|
||||||
|
color_amber='\033[0;33m'
|
||||||
|
color_yellow='\033[1;93m'
|
||||||
|
color_gray='\033[0;37m'
|
||||||
|
|
||||||
# generate netprefix
|
# generate netprefix
|
||||||
netprefix=${chain:0:1}
|
netprefix=${chain:0:1}
|
||||||
@@ -72,13 +77,6 @@ if [ "${system_ups_status}" = "SHUTTING DOWN" ]; then
|
|||||||
upsInfo="${color_red}DOWN"
|
upsInfo="${color_red}DOWN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set colors
|
|
||||||
color_red='\033[0;31m'
|
|
||||||
color_green='\033[0;32m'
|
|
||||||
color_amber='\033[0;33m'
|
|
||||||
color_yellow='\033[1;93m'
|
|
||||||
color_gray='\033[0;37m'
|
|
||||||
|
|
||||||
# check hostname
|
# check hostname
|
||||||
if [ ${#hostname} -eq 0 ]; then hostname="raspiblitz"; fi
|
if [ ${#hostname} -eq 0 ]; then hostname="raspiblitz"; fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user