diff --git a/clean_spip.sh b/clean_spip.sh index b958211a5ada4baf39c5a022f21687211a93bfa3..e29d01939ff0fa52e3df245eed0351d0fafc6e16 100644 --- a/clean_spip.sh +++ b/clean_spip.sh @@ -322,14 +322,19 @@ function clean_spip() { function check_crontab() { local spip_dir local user + local crontab_content spip_dir=$1 user=$(stat --printf %U "${spip_dir}") # Process only once each crontab if [[ $(echo "${global_crontab_users[@]}" | grep -ow "${user}" | wc -w) -lt 1 ]]; then - global_crontab_users+=("${user}") - crontab -lu "${user}" + global_crontab_users+=("${user}") + if crontab_content=$(crontab -lu "${user}") ; then + vprint "$user has a crontab to check" "RED" + else + vprint "$crontab_content" "WHITE" + fi fi }