diff --git a/check_sympa_spool_msg_dir.sh b/check_sympa_spool_msg_dir.sh index bb9f1d2..f646bfa 100755 --- a/check_sympa_spool_msg_dir.sh +++ b/check_sympa_spool_msg_dir.sh @@ -75,6 +75,14 @@ warn (){ fi } +warn_only_terminal () { + if $terminal ; then + echo "" + echo -e "\t[ \033[33m\033[1mWarning\033[m ]: $*" + echo "" + fi +} + info (){ if $terminal ; then echo "" @@ -322,11 +330,9 @@ if [[ ${#CONFLICTING_SCRIPTS} -gt 0 ]] ; then if $_stop_running ; then - echo "" - echo "[ Error ]: The \"${_script_name}\" script is currently running, but it conflicts with this script." - echo "" - echo " Exiting now.." - echo "" + warn_only_terminal "\033[1m${_script_name}\033[m is currently running, but it conflicts with this script. + + Exiting now.." clean_up 1 diff --git a/check_systemd_service.sh b/check_systemd_service.sh index de7fd41..0528c28 100755 --- a/check_systemd_service.sh +++ b/check_systemd_service.sh @@ -115,6 +115,14 @@ ok (){ fi } +warn_only_terminal () { + if $terminal ; then + echo "" + echo -e "\t[ \033[33m\033[1mWarning\033[m ]: $*" + echo "" + fi +} + blank_line() { if $terminal ; then echo "" @@ -198,11 +206,9 @@ if [[ ${#CONFLICTING_SCRIPTS} -gt 0 ]] ; then if $_stop_running ; then - echo "" - echo "[ Error ]: The \"${_script_name}\" script is currently running, but it conflicts with this script." - echo "" - echo " Exiting now.." - echo "" + warn_only_terminal "\033[1m${_script_name}\033[m is currently running, but it conflicts with this script. + + Exiting now.." clean_up 1 diff --git a/check_webservice_load.sh b/check_webservice_load.sh index 28f0038..d5706c4 100755 --- a/check_webservice_load.sh +++ b/check_webservice_load.sh @@ -69,6 +69,14 @@ error (){ echo "" } +warn_only_terminal () { + if $terminal ; then + echo "" + echo -e "\t[ \033[33m\033[1mWarning\033[m ]: $*" + echo "" + fi +} + warn (){ echo "" if $terminal ; then @@ -136,6 +144,13 @@ trim() { echo -n "$var" } +blank_line() { + if $terminal ; then + echo "" + fi +} + + #--------------------------------------- #----------------------------- @@ -224,11 +239,9 @@ if [[ ${#CONFLICTING_SCRIPTS} -gt 0 ]] ; then if $_stop_running ; then - echo "" - echo "[ Error ]: The \"${_script_name}\" script is currently running, but it conflicts with this script." - echo "" - echo " Exiting now.." - echo "" + warn_only_terminal "\033[1m${_script_name}\033[m is currently running, but it conflicts with this script. + + Exiting now.." clean_up 1