Subject: Re: bug#306: Acknowledgement (dnscrypt-proxy: init script missing for no-systemd systems)

From: Dimitris <[email-masked]>
Date: Wed, 13 Mar 2019 13:09:54 +0200

so, i've done some digging and the way to a proper working init script
for dnscrypt-proxy v2, is to run -as documented officially[1]- :

# dnscrypt-proxy -service install -config
/etc/dnscrypt-proxy/dnscrypt-proxy.toml

this will install a working /etc/init.d/dnscrypt-proxy, so maybe it
should be added in post-install for devuan?
i only had to also add -config flag in cmd parameter inside installed
init script. defaults can't find dnscrypt-proxy.toml and script doesn't
start.
you can find final working init script here[2].

---
tried lots of different older init scripts before reading through v2
docs, but none working. dnscrypt-proxy v2 has no "--daemonize" flag and
new "-child" flag,  fails even in manual run :
Mar 13 00:01:59 hostname dnscrypt-proxy[4942]: Source
[public-resolvers.md] loaded
Mar 13 00:01:59 hostname dnscrypt-proxy[4942]: dnscrypt-proxy 2.0.19
Mar 13 00:01:59 hostname dnscrypt-proxy[4942]: file file+net
listenerTCP: getsockopt: socket operation on non-socket

but that's another bug, for upstream most probably.
--

also gentoo provides an operc script[3]. but while i could get daemon
started with that, it would fail with any other action afterwards
(stop/restart/status). couldn't find /usr/sbin/dnscrypt-proxy running.

thanks,
d.

[1]
https://github.com/jedisct1/dnscrypt-proxy/wiki/Installation-linux#step-6-install-the-proxy-as-a-system-service
[2] https://annuel.framapad.org/p/devuan-dnscrypt-proxyinit
[3]
https://gitweb.gentoo.org/repo/gentoo.git/tree/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd