guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: php-fpm: Ensure no duplicate group.


From: guix-commits
Subject: 02/02: gnu: php-fpm: Ensure no duplicate group.
Date: Sun, 17 Jan 2021 14:42:00 -0500 (EST)

leoprikler pushed a commit to branch master
in repository guix.

commit e82a713c159d83d33546b672d2474426b48eb6ba
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Sat Jan 16 20:42:32 2021 +0100

    gnu: php-fpm: Ensure no duplicate group.
    
    * gnu/services/web.scm (php-fpm-accounts): Ensure `php-fpm` group is not
    duplicated.
    
    Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
---
 gnu/services/web.scm | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 855f4e6..ff7b262 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]