From e1070ee16036f6dfb84c44aea4119e4db770356b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 25 Apr 2023 17:28:21 -0400 Subject: services: mpd: Add an 'update' action to trigger a database update. * gnu/services/audio.scm (mpd-shepherd-service): Register a new update action. * doc/guix.texi (Audio Services): Document it. --- gnu/services/audio.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu') diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 8c061da47f..6e4ce3f9fb 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -620,6 +620,17 @@ appended to the configuration.") (format #t "Issued SIGHUP to Service MPD (PID ~a)." pid)) + (format #t "Service MPD is not running."))))) + (shepherd-action + (name 'update) + (documentation "Request MPD to update its music database.") + (procedure + #~(lambda (pid) + (if pid + (begin + (invoke #$(file-append mpd-mpc "/bin/mpc") "update") + (format #t "Database update requested for service \ +MPD (PID ~a)." pid)) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) -- cgit 1.4.1