"test sys_refresh_ref_cron.sh"
This commit is contained in:
parent
6bbf7aec53
commit
8f743c5e28
@ -158,16 +158,13 @@ function refresh_cronjobs
|
||||
fct_message " * ${TETALAB_USER}" -color orange
|
||||
IFS_BAK=${IFS}
|
||||
IFS=$'\n'
|
||||
CRONJOBS=$(ssh ${VM} "sudo crontab -u ${TETALAB_USER} -l 2>&1 | grep -v '^\#' | grep -v '^$' | grep -vP '^ +$'")
|
||||
CRONJOBS=$(ssh ${VM} "sudo crontab -u ${TETALAB_USER} -l 2>/dev/null | grep -v '^\#' | grep -v '^$' | grep -vP '^ +$'")
|
||||
for CRONJOB in ${CRONJOBS}
|
||||
do
|
||||
COLOR="blanc"
|
||||
MESSAGE=" - ${CRONJOB}"
|
||||
if [ $(echo "${CRONJOB}" | grep "run-parts" | wc -l) -eq 1 ]; then
|
||||
COLOR="vert"
|
||||
elif [ $(echo "${CRONJOB}" | grep "no crontab for" | wc -l) -eq 1 ]; then
|
||||
COLOR="cyan"
|
||||
CRONJOB=""
|
||||
fi
|
||||
fct_message ${MESSAGE} -color ${COLOR}
|
||||
if [ ${#CRONJOB} -gt 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user