diff options
| author | Zacchaeus <eikcaz@zacchae.us> | 2025-07-12 00:20:40 -0700 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-27 09:28:31 +0100 |
| commit | 16dbd20852ff789f927c28317be014361a41b509 (patch) | |
| tree | 614a1f6389977d8181ff142cfd93bcc332e0d18d /gnu/services | |
| parent | 6768e33bcc2bec5f2f64d1f8f094a5ed9aa39512 (diff) | |
services: tor: add auto-start?
* gnu/services/networking.scm (tor-configuration): Add `auto-start?' field.
Fix indent.
* doc/guix.texi (tor-configuration): Document this.
Change-Id: I9339291e3329d615550f97e9cc0f0d773f0d1c51
Reviewed-by: André Batista <nandre@riseup.net>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/networking.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 52e37d20ab9..6dc4eb2b1b2 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -187,6 +187,7 @@ tor-configuration-socks-socket-type tor-configuration-control-socket-path tor-configuration-transport-plugins + tor-configuration-auto-start tor-onion-service-configuration tor-onion-service-configuration? tor-onion-service-configuration-name @@ -1171,7 +1172,9 @@ applications in communication. It is used by Jami, for example."))) (control-socket? tor-configuration-control-socket-path (default #f)) (transport-plugins tor-configuration-transport-plugins - (default '()))) + (default '())) + (auto-start? tor-configuration-auto-start + (default #t))) (define %tor-accounts ;; User account and groups for Tor. @@ -1284,6 +1287,7 @@ HiddenServicePort ~a ~a~%" "Return a <shepherd-service> running Tor." (let* ((torrc (tor-configuration->torrc config)) (transport-plugins (tor-configuration-transport-plugins config)) + (auto-start? (tor-configuration-auto-start config)) (tor (least-authority-wrapper (file-append (tor-configuration-tor config) "/bin/tor") #:name "tor" @@ -1320,6 +1324,7 @@ HiddenServicePort ~a ~a~%" (start #~(make-forkexec-constructor (list #$tor "-f" #$torrc) #:user "tor" #:group "tor")) + (auto-start? auto-start?) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action torrc))) (documentation "Run the Tor anonymous network overlay."))))) |
