M gnu/home/services/shepherd.scm => gnu/home/services/shepherd.scm +2 -1
@@ 52,7 52,8 @@
shepherd-service-modules
shepherd-action
- shepherd-configuration-action))
+ shepherd-configuration-action
+ shepherd-trigger-action))
(define-record-type* <home-shepherd-configuration>
home-shepherd-configuration make-home-shepherd-configuration
M gnu/services/admin.scm => gnu/services/admin.scm +2 -8
@@ 404,10 404,7 @@ This service is deprecated and slated for removal after 2025-06-15.")
schedule)
(command '(#$program))))
(stop #~(make-timer-destructor))
- (actions (list (shepherd-action
- (name 'trigger)
- (documentation "Trigger log cleanup.")
- (procedure #~trigger-timer))))
+ (actions (list shepherd-trigger-action))
(documentation "Periodically delete old log files."))))))
(define log-cleanup-service-type
@@ 671,10 668,7 @@ which lets you search for packages that provide a given file.")
;; again.
#:wait-for-termination? #t))
(stop #~(make-timer-destructor))
- (actions (list (shepherd-action
- (name 'trigger)
- (documentation "Trigger unattended system upgrade.")
- (procedure #~trigger-timer)))))))
+ (actions (list shepherd-trigger-action)))))
(define unattended-upgrade-service-type
(service-type
M gnu/services/backup.scm => gnu/services/backup.scm +1 -5
@@ 255,11 255,7 @@ command-line arguments to the current job @command{restic backup} invocation."))
max-duration)))
(stop
#~(make-timer-destructor))
- (actions (list (shepherd-action
- (name 'trigger)
- (documentation "Manually trigger a backup,
-without waiting for the scheduled time.")
- (procedure #~trigger-timer)))))))
+ (actions (list shepherd-trigger-action)))))
(define (restic-guix-wrapper-package jobs)
(package
M gnu/services/shepherd.scm => gnu/services/shepherd.scm +8 -0
@@ 72,6 72,7 @@
shepherd-action-procedure
shepherd-configuration-action
+ shepherd-trigger-action
%default-modules
@@ 404,6 405,13 @@ of the service's configuration file."
(format #t "~a~%" #$file)
#$file))))
+(define shepherd-trigger-action
+ ;; Action to trigger a timer.
+ (shepherd-action
+ (name 'trigger)
+ (documentation "Trigger immediate execution of this timer.")
+ (procedure #~trigger-timer)))
+
(define (shepherd-configuration-file services shepherd)
"Return the shepherd configuration file for SERVICES. SHEPHERD is used
as shepherd package."