diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2023-11-14 11:48:50 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-12-22 00:31:41 +0100 |
| commit | 3d6583727ec90732ad7bd97808fd4fca8f6d8bdc (patch) | |
| tree | a92c71e2e21260e710029d3f6a63d2740bd72f37 | |
| parent | 62a08abea75b234b2ada905acb9df27406c6f1d2 (diff) | |
services: Remove unnecessary references to (gnu build shepherd).
* gnu/services/databases.scm (memcached-shepherd-service): Remove
‘with-imported-modules’ form and ‘modules’ field.
* gnu/services/security-token.scm (pcscd-shepherd-service): Remove
‘with-imported-modules’ form.
* gnu/services/web.scm (hpcguix-web-shepherd-service): Likewise.
Change-Id: Ieb817508f1751e0c1ff551a0e078789a4a813c1c
| -rw-r--r-- | gnu/services/databases.scm | 41 | ||||
| -rw-r--r-- | gnu/services/security-token.scm | 29 | ||||
| -rw-r--r-- | gnu/services/web.scm | 48 |
3 files changed, 55 insertions, 63 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index d3fee2a8ef3..580031cb423 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm | |||
| @@ -512,28 +512,25 @@ created after the PostgreSQL database is started."))) | |||
| 512 | (match-lambda | 512 | (match-lambda |
| 513 | (($ <memcached-configuration> memcached interfaces tcp-port udp-port | 513 | (($ <memcached-configuration> memcached interfaces tcp-port udp-port |
| 514 | additional-options) | 514 | additional-options) |
| 515 | (with-imported-modules (source-module-closure | 515 | (list (shepherd-service |
| 516 | '((gnu build shepherd))) | 516 | (provision '(memcached)) |
| 517 | (list (shepherd-service | 517 | (documentation "Run the Memcached daemon.") |
| 518 | (provision '(memcached)) | 518 | (requirement '(user-processes loopback)) |
| 519 | (documentation "Run the Memcached daemon.") | 519 | (start #~(make-forkexec-constructor |
| 520 | (requirement '(user-processes loopback)) | 520 | `(#$(file-append memcached "/bin/memcached") |
| 521 | (modules '((gnu build shepherd))) | 521 | "-l" #$(string-join interfaces ",") |
| 522 | (start #~(make-forkexec-constructor | 522 | "-p" #$(number->string tcp-port) |
| 523 | `(#$(file-append memcached "/bin/memcached") | 523 | "-U" #$(number->string udp-port) |
| 524 | "-l" #$(string-join interfaces ",") | 524 | "--daemon" |
| 525 | "-p" #$(number->string tcp-port) | 525 | ;; Memcached changes to the memcached user prior to |
| 526 | "-U" #$(number->string udp-port) | 526 | ;; writing the pid file, so write it to a directory |
| 527 | "--daemon" | 527 | ;; that memcached owns. |
| 528 | ;; Memcached changes to the memcached user prior to | 528 | "-P" "/var/run/memcached/pid" |
| 529 | ;; writing the pid file, so write it to a directory | 529 | "-u" "memcached" |
| 530 | ;; that memcached owns. | 530 | ,#$@additional-options) |
| 531 | "-P" "/var/run/memcached/pid" | 531 | #:log-file "/var/log/memcached" |
| 532 | "-u" "memcached" | 532 | #:pid-file "/var/run/memcached/pid")) |
| 533 | ,#$@additional-options) | 533 | (stop #~(make-kill-destructor))))))) |
| 534 | #:log-file "/var/log/memcached" | ||
| 535 | #:pid-file "/var/run/memcached/pid")) | ||
| 536 | (stop #~(make-kill-destructor)))))))) | ||
| 537 | 534 | ||
| 538 | (define memcached-service-type | 535 | (define memcached-service-type |
| 539 | (service-type (name 'memcached) | 536 | (service-type (name 'memcached) |
diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm index 2356273398d..d971091e732 100644 --- a/gnu/services/security-token.scm +++ b/gnu/services/security-token.scm | |||
| @@ -50,22 +50,19 @@ | |||
| 50 | (define pcscd-shepherd-service | 50 | (define pcscd-shepherd-service |
| 51 | (match-lambda | 51 | (match-lambda |
| 52 | (($ <pcscd-configuration> pcsc-lite) | 52 | (($ <pcscd-configuration> pcsc-lite) |
| 53 | (with-imported-modules (source-module-closure | 53 | (shepherd-service |
| 54 | '((gnu build shepherd))) | 54 | (documentation "PC/SC Smart Card Daemon") |
| 55 | (shepherd-service | 55 | (provision '(pcscd)) |
| 56 | (documentation "PC/SC Smart Card Daemon") | 56 | (requirement '(syslogd)) |
| 57 | (provision '(pcscd)) | 57 | (start #~(lambda _ |
| 58 | (requirement '(syslogd)) | 58 | (let ((socket "/run/pcscd/pcscd.comm")) |
| 59 | (modules '((gnu build shepherd))) | 59 | (when (file-exists? socket) |
| 60 | (start #~(lambda _ | 60 | (delete-file socket))) |
| 61 | (let ((socket "/run/pcscd/pcscd.comm")) | 61 | (fork+exec-command |
| 62 | (when (file-exists? socket) | 62 | (list #$(file-append pcsc-lite "/sbin/pcscd") |
| 63 | (delete-file socket))) | 63 | "--foreground") |
| 64 | (fork+exec-command | 64 | #:log-file "/var/log/pcscd.log"))) |
| 65 | (list #$(file-append pcsc-lite "/sbin/pcscd") | 65 | (stop #~(make-kill-destructor)))))) |
| 66 | "--foreground") | ||
| 67 | #:log-file "/var/log/pcscd.log"))) | ||
| 68 | (stop #~(make-kill-destructor))))))) | ||
| 69 | 66 | ||
| 70 | (define pcscd-activation | 67 | (define pcscd-activation |
| 71 | (match-lambda | 68 | (match-lambda |
diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 55cc095d90e..05fd71f9949 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm | |||
| @@ -1232,31 +1232,29 @@ a webserver.") | |||
| 1232 | (let* ((specs (hpcguix-web-configuration-specs config)) | 1232 | (let* ((specs (hpcguix-web-configuration-specs config)) |
| 1233 | (config-file (and specs (scheme-file "hpcguix-web.scm" specs))) | 1233 | (config-file (and specs (scheme-file "hpcguix-web.scm" specs))) |
| 1234 | (hpcguix-web (hpcguix-web-package config))) | 1234 | (hpcguix-web (hpcguix-web-package config))) |
| 1235 | (with-imported-modules (source-module-closure | 1235 | (shepherd-service |
| 1236 | '((gnu build shepherd))) | 1236 | (documentation "hpcguix-web daemon") |
| 1237 | (shepherd-service | 1237 | (provision '(hpcguix-web)) |
| 1238 | (documentation "hpcguix-web daemon") | 1238 | (requirement '(networking)) |
| 1239 | (provision '(hpcguix-web)) | 1239 | (start #~(make-forkexec-constructor |
| 1240 | (requirement '(networking)) | 1240 | (list #$(file-append hpcguix-web "/bin/hpcguix-web") |
| 1241 | (start #~(make-forkexec-constructor | 1241 | (string-append "--listen=" |
| 1242 | (list #$(file-append hpcguix-web "/bin/hpcguix-web") | 1242 | #$(hpcguix-web-configuration-address |
| 1243 | (string-append "--listen=" | 1243 | config)) |
| 1244 | #$(hpcguix-web-configuration-address | 1244 | "-p" |
| 1245 | config)) | 1245 | #$(number->string |
| 1246 | "-p" | 1246 | (hpcguix-web-configuration-port config)) |
| 1247 | #$(number->string | 1247 | #$@(if specs |
| 1248 | (hpcguix-web-configuration-port config)) | 1248 | #~((string-append "--config=" #$config-file)) |
| 1249 | #$@(if specs | 1249 | #~())) |
| 1250 | #~((string-append "--config=" #$config-file)) | 1250 | #:user "hpcguix-web" |
| 1251 | #~())) | 1251 | #:group "hpcguix-web" |
| 1252 | #:user "hpcguix-web" | 1252 | #:environment-variables |
| 1253 | #:group "hpcguix-web" | 1253 | (list "XDG_CACHE_HOME=/var/cache/guix/web" |
| 1254 | #:environment-variables | 1254 | "SSL_CERT_DIR=/etc/ssl/certs") |
| 1255 | (list "XDG_CACHE_HOME=/var/cache/guix/web" | 1255 | #:log-file #$%hpcguix-web-log-file)) |
| 1256 | "SSL_CERT_DIR=/etc/ssl/certs") | 1256 | (stop #~(make-kill-destructor)) |
| 1257 | #:log-file #$%hpcguix-web-log-file)) | 1257 | (actions (list (shepherd-configuration-action config-file)))))) |
| 1258 | (stop #~(make-kill-destructor)) | ||
| 1259 | (actions (list (shepherd-configuration-action config-file))))))) | ||
| 1260 | 1258 | ||
| 1261 | (define hpcguix-web-service-type | 1259 | (define hpcguix-web-service-type |
| 1262 | (service-type | 1260 | (service-type |
