Subject: [PATCH 4/8] services: mympd: Require 'syslog service when configured to log to syslog.

From: Bruno Victal <[email-masked]>
Date: Mon, 20 Mar 2023 17:07:09 +0000

* gnu/services/audio.scm (mympd-shepherd-service): Depend on 'syslog when
configured to log to syslog.
---
 gnu/services/audio.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index e9ecccd614..e5b065a479 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -749,7 +749,9 @@ (define (mympd-shepherd-service config)
     (let ((log-level* (format #f "MYMPD_LOGLEVEL=~a" log-level)))
       (shepherd-service
        (documentation "Run the myMPD daemon.")
-       (requirement `(loopback user-processes ,@shepherd-requirement))
+       (requirement `(loopback user-processes
+                               ,@(if (eqv? log-to 'syslog) '(syslog) '())
+                               ,@shepherd-requirement))
        (provision '(mympd))
        (start #~(begin
                   (let* ((pw (getpwnam #$user))
-- 
2.39.1