Browse Source

"test sys_refresh_ref_cron.sh"

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

+ 1
- 4
bin/sys_refresh_ref_cron.sh View File

@ -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…
Cancel
Save