forked from kunsi/dotfiles
add systemd timer to clean up old Downloads and old temp dirs
This commit is contained in:
parent
0b8d8d0579
commit
7e3c021199
2 changed files with 16 additions and 0 deletions
7
.config/systemd/user/cleanup-homedir.service
Normal file
7
.config/systemd/user/cleanup-homedir.service
Normal 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
|
9
.config/systemd/user/cleanup-homedir.timer
Normal file
9
.config/systemd/user/cleanup-homedir.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run cleanup-downloads
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in a new issue