mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 20:40:32 +01:00
Simplify cleaning of temporary files.
This commit is contained in:
9
systemd/.config/systemd/user/tmpfiles-cleanup.service
Normal file
9
systemd/.config/systemd/user/tmpfiles-cleanup.service
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Cleanup of the XDG_CACHE_HOME directory
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/systemd-tmpfiles --root=%h --clean %h/.config/tmpfiles/tmpfiles.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Cleanup of the XDG_CACHE_HOME directory
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Environment="XDG_CACHE_HOME=%h/.cache"
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=/usr/bin/find $XDG_CACHE_HOME -atime +60 -delete -print
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Weekly cache dir cleanup
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=weekly
|
|
||||||
Persistent=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
3
systemd/.config/tmpfiles/tmpfiles.conf
Normal file
3
systemd/.config/tmpfiles/tmpfiles.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#Type Path Mode UID GID Age Argument
|
||||||
|
e /.cache - - - 60d -
|
||||||
|
e /Downloads - - - 7d -
|
||||||
Reference in New Issue
Block a user