diff options
author | Christopher Baines <mail@cbaines.net> | 2024-12-18 12:46:59 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-12-18 16:00:09 +0000 |
commit | 32c106c93fbe00dd627a8267f0f1ba2318a88233 (patch) | |
tree | 3356a75db1976f919e9646a00b1b48029cef9d38 | |
parent | ae61d466eb45ebc36f97bb06ccd7160642013288 (diff) | |
download | guix-32c106c93fbe00dd627a8267f0f1ba2318a88233.tar guix-32c106c93fbe00dd627a8267f0f1ba2318a88233.tar.gz |
WIP
Change-Id: I4eb01b8cf7fbd38b0a564726140fe0f51cd1b849
-rw-r--r-- | gnu/services/web.scm | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm index e8b1657a2a..289177d1ca 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1891,23 +1891,17 @@ WSGIPassAuthorization On (define (patchwork-django-admin-gexp patchwork settings-module) #~(lambda (_ . command) - (let ((pid (primitive-fork))) - (if (eq? pid 0) - (let ((user (getpwnam "httpd"))) - (setgid (passwd:gid user)) - (setuid (passwd:uid user)) - - (let ((pid - (spawn - #$(file-append patchwork "/bin/patchwork-admin") - (cons #$(file-append patchwork "/bin/patchwork-admin") - command) - #:environment - `("DJANGO_SETTINGS_MODULE=guix.patchwork.settings" - ,(string-append "PYTHONPATH=" #$settings-module) - ,@(environ))))) - (waitpid pid))) - (zero? (cdr (waitpid pid))))))) + (let ((pid + (fork+exec-command + (cons #$(file-append patchwork "/bin/patchwork-admin") + command) + #:user "httpd" + #:group "httpd" + #:environment + `("DJANGO_SETTINGS_MODULE=guix.patchwork.settings" + ,(string-append "PYTHONPATH=" #$settings-module) + ,@(environ))))) + (waitpid pid)))) (define (patchwork-django-admin-action patchwork settings-module) (shepherd-action |