guix-commits
[Top][All Lists]
Advanced

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

12/12: services: tor: Remove unnecessary modules from shepherd environme


From: guix-commits
Subject: 12/12: services: tor: Remove unnecessary modules from shepherd environment.
Date: Fri, 18 Nov 2022 09:49:15 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 2a358911b0cf5273380bb4f22a74879f31cecaaf
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Nov 18 15:40:14 2022 +0100

    services: tor: Remove unnecessary modules from shepherd environment.
    
    This is a followup to fb868cd7794f15e21298e5bdea996fbf0dad17ca.
    
    * gnu/services/networking.scm (tor-shepherd-service): Remove unused
    'with-imported-modules' and 'modules' field.
---
 gnu/services/networking.scm | 38 ++++++++++++++++----------------------
 1 file changed, 16 insertions(+), 22 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 18d1eb5b8c..de02f16a34 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1011,30 +1011,24 @@ HiddenServicePort ~a ~a~%"
                                       (source torrc)
                                       (target source)))
                     #:namespaces (delq 'net %namespaces))))
-       (with-imported-modules (source-module-closure
-                               '((gnu build shepherd)
-                                 (gnu system file-systems)))
-         (list (shepherd-service
-                (provision '(tor))
-
-                ;; Tor needs at least one network interface to be up, hence the
-                ;; dependency on 'loopback'.
-                (requirement '(user-processes loopback syslogd))
+       (list (shepherd-service
+              (provision '(tor))
 
-                (modules '((gnu build shepherd)
-                           (gnu system file-systems)))
+              ;; Tor needs at least one network interface to be up, hence the
+              ;; dependency on 'loopback'.
+              (requirement '(user-processes loopback syslogd))
 
-                ;; XXX: #:pid-file won't work because the wrapped 'tor'
-                ;; program would print its PID within the user namespace
-                ;; instead of its actual PID outside.  There's no inetd or
-                ;; systemd socket activation support either (there's
-                ;; 'sd_notify' though), so we're stuck with that.
-                (start #~(make-forkexec-constructor
-                          (list #$tor "-f" #$torrc)
-                          #:user "tor" #:group "tor"))
-                (stop #~(make-kill-destructor))
-                (actions (list (shepherd-configuration-action torrc)))
-                (documentation "Run the Tor anonymous network overlay."))))))))
+              ;; XXX: #:pid-file won't work because the wrapped 'tor'
+              ;; program would print its PID within the user namespace
+              ;; instead of its actual PID outside.  There's no inetd or
+              ;; systemd socket activation support either (there's
+              ;; 'sd_notify' though), so we're stuck with that.
+              (start #~(make-forkexec-constructor
+                        (list #$tor "-f" #$torrc)
+                        #:user "tor" #:group "tor"))
+              (stop #~(make-kill-destructor))
+              (actions (list (shepherd-configuration-action torrc)))
+              (documentation "Run the Tor anonymous network overlay.")))))))
 
 (define (tor-activation config)
   "Set up directories for Tor and its hidden services, if any."



reply via email to

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