Move color defs above their use cases (#3082)

After this fix the UPS status color is displayed as intended.
This commit is contained in:
HiLivin 2022-05-02 17:36:50 +00:00 committed by GitHub
parent 62b40e92b3
commit de43ca96c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,12 @@ if [ "${PARAMETER_LIGHTNING}" == "none" ]; then
lightning=""
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
netprefix=${chain:0:1}
@ -72,13 +77,6 @@ if [ "${system_ups_status}" = "SHUTTING DOWN" ]; then
upsInfo="${color_red}DOWN"
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
if [ ${#hostname} -eq 0 ]; then hostname="raspiblitz"; fi