mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2025-02-26 05:09:48 -05:00
Fixed download folder manager service
This commit is contained in:
parent
ba2e2d7b10
commit
51bdc7674c
1 changed files with 3 additions and 3 deletions
|
@ -38,15 +38,15 @@
|
|||
(define downloads-garbage-collector-service
|
||||
(match-record-lambda <downloads-garbage-collector-configuration>
|
||||
(user)
|
||||
(let ((cleanup-command #~(list "find" (string-append "/home/" #$user "/Downloads") "-mtime" "+7" "-exec" "rm" "-rf" "{}" "';'")))
|
||||
(let ((cleanup-command #~(list "find" (string-append "/home/" #$user "/Downloads") "-mtime" "+7" "-exec" "rm" "-rf" "'{}'" ";")))
|
||||
(shepherd-service
|
||||
(documentation "Garbage collect downloaded files more than 1 week old for USER.")
|
||||
(provision '(downloads-garbage-collector))
|
||||
;(requirement '(root))
|
||||
(modules '((shepherd service timer)))
|
||||
(start #~(make-timer-constructor
|
||||
(calendar-event #:hours '(8) #:minutes '(20)
|
||||
#:days-of-week '(tuesday))
|
||||
(calendar-event #:hours '(19) #:minutes '(50)
|
||||
#:days-of-week '(monday))
|
||||
(command #$cleanup-command)))
|
||||
(stop #~(make-timer-destructor))
|
||||
(actions (list (shepherd-action
|
||||
|
|
Loading…
Reference in a new issue