"test sys_refresh_ref_cron.sh"

This commit is contained in:
Doug Le Tough 2017-07-24 13:16:02 +02:00
parent e3b5cda288
commit 113f060b11

View File

@ -140,9 +140,15 @@ function get_cronjobs
fct_message " * ${TETALAB_USER}" -color orange
IFS_BAK=${IFS}
IFS=$'\n'
for CRON in $(ssh ${VM} "sudo crontab -u ${TETALAB_USER} -l | grep -v ^\# | grep -v ^$ | grep -v '/usr/bin/run-parts' | grep -v 'no crontab for'")
CRONJOBS=$(ssh ${VM} "crontab -u ${TETALAB_USER} -l | grep -v '^\#' | grep -v '^$' | grep -vP '^ +$' | grep -v '/usr/bin/run-parts'")
RET_VAL=$?
if [ ! ${RET_VAL} -eq 0 ]; then
ERROR="Erreur lors de la récupération de la liste des jobs"
fct_erreur 3
fi
for CRONJOB in ${CRONJOBS}
do
fct_message " - ${CRON}"
fct_message ${CRONJOB}
done
IFS=${IFS_BAK}
done