diff --git a/.config/systemd/user/cleanup-homedir.service b/.config/systemd/user/cleanup-homedir.service new file mode 100644 index 0000000..3eba45e --- /dev/null +++ b/.config/systemd/user/cleanup-homedir.service @@ -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 diff --git a/.config/systemd/user/cleanup-homedir.timer b/.config/systemd/user/cleanup-homedir.timer new file mode 100644 index 0000000..8e0dcac --- /dev/null +++ b/.config/systemd/user/cleanup-homedir.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run cleanup-downloads + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target