Browse Source

"test sys_refresh_ref_cron.sh"

master
Doug Le Tough 5 years ago
parent
commit
113f060b11
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      bin/sys_refresh_ref_cron.sh

+ 8
- 2
bin/sys_refresh_ref_cron.sh 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


Loading…
Cancel
Save