From: Efraim Flashner <efraim@flashner.co.il>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: help-guix@gnu.org
Subject: Re: Privoxy user config without hard-coded GNU store path?
Date: Sun, 6 Oct 2019 15:22:45 +0300 [thread overview]
Message-ID: <20191006122245.GH561@E5400> (raw)
In-Reply-To: <87y2xygkhc.fsf@ambrevar.xyz>
[-- Attachment #1: Type: text/plain, Size: 2195 bytes --]
On Sun, Oct 06, 2019 at 01:51:43PM +0200, Pierre Neidhardt wrote:
> Hi!
>
> I start a privoxy daemon on login like this:
>
> --8<---------------cut here---------------start------------->8---
> privoxy --no-daemon ~/.config/privoxy/config &
> --8<---------------cut here---------------end--------------->8---
>
> ~/.config/privoxy/config contains essentially this:
>
>
> --8<---------------cut here---------------start------------->8---
> ## Mandatory options:
> confdir /gnu/store/b1nv74wiz4i32vracafmdqiij8y8p7il-privoxy-3.0.28/etc/privoxy
> logdir /gnu/store/b1nv74wiz4i32vracafmdqiij8y8p7il-privoxy-3.0.28/var/log/privoxy
>
> ## My options:
> forward-socks5t / 127.0.0.1:9050 .
> --8<---------------cut here---------------end--------------->8---
>
> The problem is that the config won't stand an upgrade +
> garbage-collection of the old path.
The simple solution here is to change the lines to
confdir /home/USER/.guix-profile/etc/privoxy
logdir /home/USER/log/privoxy
>
> Ideally, we could have a Shepherd service to start and configure privoxy
> reliably.
>
> Is there any other way to configure privoxy reliably?
>
If you want an untested user shepherd service, here's one I've come up
with on the spot:
(define privoxy
(make <service>
#:provides '(privoxy)
#:docstring "Privoxy filters outgoing internet connections"
#:start (make-forkexec-constructor
'("/var/guix/profiles/per-user/USER/current-guix/bin/privoxy" "--no-daemon" "/home/USER/.config/privoxy/config")
#:log-file "/home/USER/log/privoxy/privoxy.log")
#:stop (make-kill-destructor)
#:respawn? #t))
(register-services privoxy)
And then you'd add that to your ~/.config/shepherd/init.scm
I have at the bottom of mine:
;; Send shepherd into the background
(action 'shepherd 'daemonize)
(for-each start '(syncthing kdeconnect))
and at the top:
(use-modules (shepherd service))
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-10-06 12:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-06 11:51 Privoxy user config without hard-coded GNU store path? Pierre Neidhardt
2019-10-06 12:22 ` Efraim Flashner [this message]
2019-10-06 12:46 ` Pierre Neidhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191006122245.GH561@E5400 \
--to=efraim@flashner.co.il \
--cc=help-guix@gnu.org \
--cc=mail@ambrevar.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.