2020-08-06 16:20:43 +02:00
|
|
|
NORMAL='\e[39m'
|
|
|
|
RED='\e[31m'
|
2020-08-06 16:23:54 +02:00
|
|
|
GREEN='\e[32m'
|
2020-08-06 16:20:43 +02:00
|
|
|
|
|
|
|
msglog() {
|
2020-08-06 16:23:54 +02:00
|
|
|
case "${1}" in
|
|
|
|
green)
|
|
|
|
TEXT_COLOR="${GREEN}"
|
|
|
|
;;
|
|
|
|
red)
|
|
|
|
TEXT_COLOR="${RED}"
|
|
|
|
;;
|
|
|
|
normal)
|
|
|
|
TEXT_COLOR="${NORMAL}"
|
|
|
|
;;
|
|
|
|
esac
|
2020-08-06 16:20:43 +02:00
|
|
|
DATE=$(date '+%Y %b %d %H:%M:%S')
|
2020-08-06 16:23:54 +02:00
|
|
|
echo ${DATE} ${TEXT_COLOR}${2}${NORMAL}
|
2020-08-06 16:20:43 +02:00
|
|
|
}
|