Some minor changes on output of script 'check_postfix.sh'.

This commit is contained in:
Christoph 2018-03-18 14:02:08 +01:00
parent b65a7bc69d
commit e376c1ab4b

View File

@ -23,11 +23,20 @@ LOCK_DIR=`mktemp -d`
#-----------------------------
#---------------------------------------
fatal(){
echo ""
echo -e " [ Fatal ] $*"
if $terminal ; then
echo -e " [ \033[31m\033[1mFatal\033[m ] $*"
else
echo -e " [ Fatal ] $*"
fi
echo ""
echo -e "\tScript terminated.."
if $terminal ; then
echo -e " \033[1mScript terminated\033[m.."
else
echo -e " Script terminated.."
fi
echo ""
rm -rf $LOCK_DIR
exit 1
@ -35,25 +44,41 @@ fatal(){
error (){
echo ""
echo -e " [ Error ] $*"
if $terminal ; then
echo -e " [ \033[31m\033[1mError\033[m ] $*"
else
echo " [ Error ] $*"
fi
echo ""
}
warn (){
echo ""
echo -e " [ Warn ] $*"
if $terminal ; then
echo -e " [ \033[33m\033[1mWarn\033[m ] $*"
else
echo " [ Warn ] $*"
fi
echo ""
}
info (){
echo ""
echo -e " [ Info ] $*"
if $terminal ; then
echo -e " [ \033[32m\033[1mInfo\033[m ] $*"
else
echo " [ Info ] $*"
fi
echo ""
}
ok (){
echo ""
echo -e " [ Ok ] $*"
if $terminal ; then
echo -e " [ \033[32m\033[1mOk\033[m ] $*"
else
echo " [ Ok ] $*"
fi
echo ""
}