add systemd timer to clean up old Downloads and old temp dirs

This commit is contained in:
Franzi 2021-07-09 12:39:27 +02:00
parent 0b8d8d0579
commit 7e3c021199
Signed by untrusted user: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,7 @@
[Unit]
Description=Clean Up Homedir
[Service]
ExecStart=/usr/bin/find /home/kunsi/Downloads/ -mtime +30 -delete
ExecStart=/usr/bin/find /home/kunsi -maxdepth 1 -type d -iname 'tmp.*' -mtime +30 -exec rm -r {} \;
Type=oneshot

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run cleanup-downloads
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target