summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/services/web.scm27
1 files changed, 14 insertions, 13 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 855f4e649b..ff7b262b6a 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -922,19 +922,20 @@ of index files."
 (define php-fpm-accounts
   (match-lambda
     (($ <php-fpm-configuration> php socket user group socket-user socket-group _ _ _ _ _ _)
-     (list
-      (user-group (name "php-fpm") (system? #t))
-      (user-group
-       (name group)
-       (system? #t))
-      (user-account
-       (name user)
-       (group group)
-       (supplementary-groups '("php-fpm"))
-       (system? #t)
-       (comment "php-fpm daemon user")
-       (home-directory "/var/empty")
-       (shell (file-append shadow "/sbin/nologin")))))))
+     `(,@(if (equal? group "php-fpm")
+             '()
+             (list (user-group (name "php-fpm") (system? #t))))
+       ,(user-group
+         (name group)
+         (system? #t))
+       ,(user-account
+         (name user)
+         (group group)
+         (supplementary-groups '("php-fpm"))
+         (system? #t)
+         (comment "php-fpm daemon user")
+         (home-directory "/var/empty")
+         (shell (file-append shadow "/sbin/nologin")))))))
 
 (define (default-php-fpm-config socket user group socket-user socket-group
           pid-file log-file pm display-errors timezone workers-log-file)