aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/messaging.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/messaging.scm')
-rw-r--r--gnu/services/messaging.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 4b7e724a78..1108006411 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -632,13 +632,20 @@ See also @url{https://prosody.im/doc/modules/mod_muc}."
(opaque-prosody-configuration-prosody config)
(prosody-configuration-prosody config)))
(prosodyctl-bin (file-append prosody "/bin/prosodyctl"))
+ (pid-file (prosody-configuration-pidfile config))
(prosodyctl-action (lambda args
#~(lambda _
- (zero? (system* #$prosodyctl-bin #$@args))))))
+ (invoke #$prosodyctl-bin #$@args)
+ (match '#$args
+ (("start")
+ (call-with-input-file #$pid-file read))
+ (_ #t))))))
(list (shepherd-service
(documentation "Run the Prosody XMPP server")
(provision '(prosody xmpp-daemon))
(requirement '(networking syslogd user-processes))
+ (modules `((ice-9 match)
+ ,@%default-modules))
(start (prosodyctl-action "start"))
(stop (prosodyctl-action "stop"))))))