From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: Privoxy user config without hard-coded GNU store path? Date: Sun, 6 Oct 2019 15:22:45 +0300 Message-ID: <20191006122245.GH561@E5400> References: <87y2xygkhc.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PMULwz+zIGJzpDN9" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55313) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iH5Yo-00031l-Op for help-guix@gnu.org; Sun, 06 Oct 2019 08:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iH5Ym-0008Bm-K0 for help-guix@gnu.org; Sun, 06 Oct 2019 08:22:49 -0400 Received: from flashner.co.il ([178.62.234.194]:40336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iH5Ym-0008B8-BP for help-guix@gnu.org; Sun, 06 Oct 2019 08:22:48 -0400 Content-Disposition: inline In-Reply-To: <87y2xygkhc.fsf@ambrevar.xyz> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt Cc: help-guix@gnu.org --PMULwz+zIGJzpDN9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 06, 2019 at 01:51:43PM +0200, Pierre Neidhardt wrote: > Hi! >=20 > I start a privoxy daemon on login like this: >=20 > --8<---------------cut here---------------start------------->8--- > privoxy --no-daemon ~/.config/privoxy/config & > --8<---------------cut here---------------end--------------->8--- >=20 > ~/.config/privoxy/config contains essentially this: >=20 >=20 > --8<---------------cut here---------------start------------->8--- > ## Mandatory options: > confdir /gnu/store/b1nv74wiz4i32vracafmdqiij8y8p7il-privoxy-3.0.28/etc/pr= ivoxy > logdir /gnu/store/b1nv74wiz4i32vracafmdqiij8y8p7il-privoxy-3.0.28/var/log= /privoxy >=20 > ## My options: > forward-socks5t / 127.0.0.1:9050 . > --8<---------------cut here---------------end--------------->8--- >=20 > 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=20 confdir /home/USER/.guix-profile/etc/privoxy logdir /home/USER/log/privoxy >=20 > Ideally, we could have a Shepherd service to start and configure privoxy > reliably. >=20 > Is there any other way to configure privoxy reliably? >=20 If you want an untested user shepherd service, here's one I've come up with on the spot: (define privoxy (make #: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)) --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --PMULwz+zIGJzpDN9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl2Z3JIACgkQQarn3Mo9 g1HqrRAAjNzUDFg3XCiz2IvGDgLnIlSdZQpQ210GS21ZSWbVf4QLIJ8G3cAALoen DX1ej7aNjVfKga9qAbdcgXBx7P5QDfby5ezS2XCtk3VTA29wVEJ3Z2iwReOJQsfD 8jUfdSxSo+fQHDDEBVMUPQsr5mFYxtLkMk7/GetJImPcU6JgGu4Awu4qXURxQPsX 5PnCiJI5paN3jPUN8uKeTzle8/A1yxRwtY5mYPi413W3MzZRHhY+xkT63zwwa61W utm7TWdy12tbX5SO+j2+L5GRb2d3Arq8jDGNGnBc+5skf7lQ+j/zdOt620dN6UNS 2+oOfCEV4ggzA1pyqNZn7fDzEx56BD+Jriu+IZPj9ei1RNnCe07V2rWQjdNpfQH4 hlWx7tBGK2KzUJnCvFIBELYYIBa0fgvzMqxZ0XmycsWdn5BZMPZktfCXFJBo/Whi wpgRRimTwedzMuvDrVFv1ibYCU5jEwQCKpE1VJ8LytxF34yOGX4EUKziresYmkIS q6TMH0ZDuGLcgVOx9sIqcwK0s/HWSf0JbB9gpa2Ac4ctsufS1/x6LtazwiCP71cG PqCRadBxrm/ZHsKoR4qw0CrmfT5+IDskenpMAAGPzWL382HQvwKIWy8xaEjO0MTZ 5g7ctwS5adCebxDp7ZBKcKscoZH1HckpwDmRk18hH/OgwqrdtsY= =O5jb -----END PGP SIGNATURE----- --PMULwz+zIGJzpDN9--