summary refs log tree commit diff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/web.scm')
-rw-r--r--gnu/services/web.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 467656444e..df82a6de61 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -608,16 +608,14 @@ of index files."
                                (default-nginx-config config))
                          #$@args)
                  (match '#$args
-                   (("-s" . _) #t)
+                   (("-s" . _) #f)
                    (_
-                    (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 #<eof>
-                            (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
@@ -967,7 +965,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