summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-12-19 20:47:15 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-12-19 21:15:12 +0300
commit0485717ee94e7f161d072f017edce5d35df49c81 (patch)
tree04d28f8c98bf4656f1aab640d1337858646f9dc7 /gnu
parent9a50cedc6bd0332339fda9a20327d5ac5383bc15 (diff)
services: zabbix-front-end: Improve hint and error messages.
* gnu/services/monitoring.scm (zabbix-front-end-config): Improve hint and error messages.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/monitoring.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm
index 18413096e4..4c7a717a9d 100644
--- a/gnu/services/monitoring.scm
+++ b/gnu/services/monitoring.scm
@@ -29,9 +29,11 @@
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix records)
+ #:use-module ((guix ui) #:select (display-hint))
#:use-module (ice-9 match)
#:use-module (ice-9 rdelim)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-35)
#:export (darkstat-configuration
prometheus-node-exporter-configuration
darkstat-service-type
@@ -525,16 +527,16 @@ $DB['DATABASE'] = '" db-name "';
$DB['USER'] = '" db-user "';
$DB['PASSWORD'] = '" (if (string-null? db-password)
(if (string-null? db-secret-file)
- (display "Provide a `db-secret-file' \
-or `db-password' field.
-"
- (current-error-port))
+ (raise (condition
+ (&message
+ (message "\
+You must provide either 'db-secret-file' or 'db-password'."))))
(string-trim-both
(with-input-from-file db-secret-file
read-string)))
(begin
- (display "
-Hint: Consider use `db-secret-file' instead of `db-password' and unset
+ (display-hint "
+Consider use `db-secret-file' instead of `db-password' and unset
`db-password' for security in `zabbix-front-end-configuration'.
")
db-password)) "';