From 7df945656cd448b13969f90a7a95d8a4e9d442f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 6 Sep 2018 13:49:06 +0200 Subject: services: hpcguix-web: Set SSL_CERT_DIR. Previously Git pulls over HTTPS would fail with: guix/git.scm:132:7: In procedure update-cached-checkout: Throw to key `git-error' with args `(#< code: -17 message: "the SSL certificate is invalid" class: 16>)'. * gnu/services/web.scm (hpcguix-web-shepherd-service): Pass "SSL_CERT_DIR=/etc/ssl/certs". * doc/guix.texi (Web Services): Mention certificates. --- gnu/services/web.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/services/web.scm') diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 467656444e..3778efd048 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -967,7 +967,8 @@ a webserver.") #:user "hpcguix-web" #:group "hpcguix-web" #:environment-variables - (list "XDG_CACHE_HOME=/var/cache"))) + (list "XDG_CACHE_HOME=/var/cache" + "SSL_CERT_DIR=/etc/ssl/certs"))) (stop #~(make-kill-destructor)))))) (define hpcguix-web-service-type -- cgit v1.2.3 From 985975ae80fe5a8e58319b3a5aaf14da940c4419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 8 Sep 2018 18:48:48 +0200 Subject: services: nginx: Don't read PID file when passed a custom config file. Fixes . * gnu/services/web.scm (nginx-shepherd-service): Check whether FILE is true and don't read the PID file if it is; use 'read-pid-file' instead of a potentially endless loop. --- gnu/services/web.scm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'gnu/services/web.scm') diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 3778efd048..1c993b29fe 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -610,14 +610,12 @@ of index files." (match '#$args (("-s" . _) #t) (_ - (let loop ((duration 0)) - ;; https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864/comments/7 - (sleep duration) - (if (file-exists? #$pid-file) - (let ((pid (call-with-input-file #$pid-file read))) - ;; it could be # - (if (integer? pid) pid (loop 1))) - (loop 1))))))))) + ;; When FILE is true, we cannot be sure that PID-FILE will + ;; be created, so assume it won't show up. When FILE is + ;; false, read PID-FILE. + #$(if file + #~#t + #~(read-pid-file #$pid-file)))))))) ;; TODO: Add 'reload' action. (list (shepherd-service -- cgit v1.2.3 From e80c725db7d11618dec7c3f92845f71b0a9715b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 8 Sep 2018 18:50:55 +0200 Subject: services: nginx: 'stop' returns #f. Previously we'd return #t, which the Shepherd would consider a failure to stop the service. * gnu/services/web.scm (nginx-shepherd-service): In 'nginx-action', return #f when stopping the service. --- gnu/services/web.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/services/web.scm') diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 1c993b29fe..df82a6de61 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -608,7 +608,7 @@ of index files." (default-nginx-config config)) #$@args) (match '#$args - (("-s" . _) #t) + (("-s" . _) #f) (_ ;; When FILE is true, we cannot be sure that PID-FILE will ;; be created, so assume it won't show up. When FILE is -- cgit v1.2.3