[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 03/06: herd: Print "disabled" in red when the service was res
From: |
Ludovic Courtès |
Subject: |
[shepherd] 03/06: herd: Print "disabled" in red when the service was respawned. |
Date: |
Wed, 14 Jun 2023 12:46:25 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit a4fe28a39a3bfbcb3a262e83885160d7b0202b38
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jun 14 17:46:46 2023 +0200
herd: Print "disabled" in red when the service was respawned.
* modules/shepherd/scripts/herd.scm (display-service-status): Highlight
differently "It is disabled." depending on whether the service was
respawned.
---
modules/shepherd/scripts/herd.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/shepherd/scripts/herd.scm
b/modules/shepherd/scripts/herd.scm
index 04d8be7..929581f 100644
--- a/modules/shepherd/scripts/herd.scm
+++ b/modules/shepherd/scripts/herd.scm
@@ -236,7 +236,10 @@ into a @code{live-service} record."
(if (live-service-enabled? service)
(format #t (l10n " It is enabled.~%"))
- (format #t (highlight/warn (l10n " It is disabled.~%"))))
+ (let ((highlight (if (null? (live-service-last-respawns service))
+ highlight/warn
+ highlight/error)))
+ (format #t (highlight (l10n " It is disabled.~%")))))
(format #t (l10n " Provides ~a.~%") (live-service-provision service))
(format #t (l10n " Requires ~a.~%") (live-service-requirement service))
(if (live-service-respawn? service)
- [shepherd] branch master updated (24c9640 -> d5ed516), Ludovic Courtès, 2023/06/14
- [shepherd] 05/06: service: Preserve "disabled" flag when replacing., Ludovic Courtès, 2023/06/14
- [shepherd] 03/06: herd: Print "disabled" in red when the service was respawned.,
Ludovic Courtès <=
- [shepherd] 02/06: service: 'start-service' returns #f when dependencies failed to start., Ludovic Courtès, 2023/06/14
- [shepherd] 01/06: service: Always honor the 'enabled?' flag., Ludovic Courtès, 2023/06/14
- [shepherd] 06/06: README: Document use of the Guix channel., Ludovic Courtès, 2023/06/14
- [shepherd] 04/06: tests: Simplify 'tests/replacement.sh'., Ludovic Courtès, 2023/06/14