Rename instead of delete outdated exam-user directories on localhome-clients
Exam mode don't collect home-directories on localhome clients. Deleting home of exam-users will result in potential data loss. But keeping the home under the same name will prevent new exam at the next day. Solution: Rename home (and /lmn/media/) of user after 12h and delete after 10d.
This commit is contained in:
parent
727922f152
commit
39da308ff7
3 changed files with 27 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Remove -exam homes older than 12h
|
||||
Description=Rename/Remove -exam directories older than 12h/10d
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=find /home/ -maxdepth 1 -mindepth 1 -name '*-exam' -type d -cmin +720 -exec rm -rf {} \;
|
||||
ExecStart=/usr/local/sbin/rmexam
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue