"test sys_refresh_ref_cron.sh"
This commit is contained in:
parent
e3b5cda288
commit
113f060b11
@ -140,9 +140,15 @@ function get_cronjobs
|
|||||||
fct_message " * ${TETALAB_USER}" -color orange
|
fct_message " * ${TETALAB_USER}" -color orange
|
||||||
IFS_BAK=${IFS}
|
IFS_BAK=${IFS}
|
||||||
IFS=$'\n'
|
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
|
do
|
||||||
fct_message " - ${CRON}"
|
fct_message ${CRONJOB}
|
||||||
done
|
done
|
||||||
IFS=${IFS_BAK}
|
IFS=${IFS_BAK}
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user