From adac4927288f5aea0eac120692703558a4cc1866 Mon Sep 17 00:00:00 2001 From: Doug Le Tough Date: Mon, 24 Jul 2017 13:48:43 +0200 Subject: [PATCH] "test sys_refresh_ref_cron.sh" --- bin/sys_refresh_ref_cron.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/bin/sys_refresh_ref_cron.sh b/bin/sys_refresh_ref_cron.sh index d493016..ed287c9 100755 --- a/bin/sys_refresh_ref_cron.sh +++ b/bin/sys_refresh_ref_cron.sh @@ -150,20 +150,11 @@ function get_cronjobs do COLOR="blanc" MESSAGE=" - ${CRONJOB}" - case ${CRONJOB} in - "'*run-parts*'") + if [ $(echo "${CRONJOB}" | grep "run-parts" | wc -l) -eq 1 ]; then COLOR="cyan" - ;; - "'*no crontab for*'") + elif [ $(echo "${CRONJOB}" | grep "no crontab for" | wc -l) -eq 1 ]; then COLOR="bleu" - ;; - esac - #~ if [[ "${CRONJOB}" =~ *run-parts* ]]; then - #~ COLOR="cyan" - #~ fi - #~ if [[ "${CRONJOB}" =~ *no crontab for* ]]; then - #~ COLOR="bleu" - #~ fi + fi fct_message ${MESSAGE} -color ${COLOR} done IFS=${IFS_BAK}