Add scripts for remove user at-jobs and cron-jobs.

This commit is contained in:
Meng Bo 2016-02-26 15:29:13 +08:00
parent 6ce9e24580
commit 84596e8eee

View File

@ -152,10 +152,15 @@ crash_data() {
verbose
}
# Todo
cron_spool() {
verbose "# Remove user at-jobs and cron-jobs"
run
$users=`grep bash /etc/passwd | cut -d : -f 1`
for u in $users; do
for a in `sudo -u $u at -l | cut -f 1`; do
run "sudo -u $u at -r $a"
done
run "crontab -u $u -r"
done
verbose
}