mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
services: tor: Remove unnecessary modules from shepherd environment.
This is a followup to fb868cd779
.
* gnu/services/networking.scm (tor-shepherd-service): Remove unused
'with-imported-modules' and 'modules' field.
This commit is contained in:
parent
8b56983999
commit
2a358911b0
1 changed files with 16 additions and 22 deletions
|
@ -1011,30 +1011,24 @@ (define (tor-shepherd-service config)
|
|||
(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))
|
||||
(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))
|
||||
;; Tor needs at least one network interface to be up, hence the
|
||||
;; dependency on 'loopback'.
|
||||
(requirement '(user-processes loopback syslogd))
|
||||
|
||||
(modules '((gnu build shepherd)
|
||||
(gnu system file-systems)))
|
||||
|
||||
;; 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."
|
||||
|
|
Loading…
Reference in a new issue