diff --git a/uscrontab b/uscrontab index 85bc28b..0ac3a21 100755 --- a/uscrontab +++ b/uscrontab @@ -287,14 +287,14 @@ elif [ "$action" == "list" ]; then ctfiles=("$crontab") fi else - array_from_xlines ctfiles "$(crontab -l 2>/dev/null | awkrun script="$script" '$6 == script { print $7 }')" - if array_contains ctfiles ""; then + array_from_lines ctfiles "$(crontab -l 2>/dev/null | awkrun script="$script" '$6 == script { if ($7) print $7; else print "GENERIC" }')" + if array_contains ctfiles "GENERIC"; then # il y a une planification générique - array_del ctfiles "" + array_del ctfiles "GENERIC" set_usercrontabs usercrontabs array_extend ctfiles usercrontabs elif [ ${#ctfiles[*]} -eq 0 ]; then - ewarn "aucune planification en cours" + einfo "aucune planification en cours" set_usercrontabs ctfiles fi fi