[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 01/02: service: Correctly log failure to start a service.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 01/02: service: Correctly log failure to start a service. |
Date: |
Wed, 15 Mar 2023 19:02:58 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit d8c87c7aefaa23cf6311615dc0b5e1d022912623
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Mar 15 11:18:32 2023 +0100
service: Correctly log failure to start a service.
* modules/shepherd/service.scm (service-controller): In 'start' handler,
report "failed to start" when RUNNING is false.
---
modules/shepherd/service.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index b9364ac..784437d 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -358,8 +358,11 @@ Log abnormal termination reported by @var{status}."
(spawn-fiber
(lambda ()
(let ((running (get-message notification)))
- (local-output (l10n "Service ~a started.")
- (canonical-name service))
+ (if running
+ (local-output (l10n "Service ~a started.")
+ (canonical-name service))
+ (local-output (l10n "Service ~a failed to start.")
+ (canonical-name service)))
(put-message channel
(list *service-started* running)))))
(local-output (l10n "Starting service ~a...")