own-pki/lib/set-color.sh
2026-04-20 06:27:02 +02:00

26 lines
503 B
Bash

# check if run from script
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 1
#-----------------------------------------------------------
# set colors
# RED Error
# ORANGE Attention or color for parameters when
# confirmation
# CYAN Ask to useer
# GREEN OK
set_color(){
if [[ "$ENABLE_COLOR" == "true" ]]; then
RED='\e[0;31m'
ORANGE='\e[0;33m'
CYAN='\e[0;36m'
GREEN='\e[0;32m'
NC='\e[0m'
else
RED=''
ORANGE=''
CYAN=''
GREEN=''
NC=''
fi
}