mirror of
https://github.com/valitydev/linux-sysprep.git
synced 2024-11-06 02:25:18 +00:00
Add scripts for remove user at-jobs and cron-jobs.
This commit is contained in:
parent
6ce9e24580
commit
84596e8eee
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user