dnscrypt-proxy icon indicating copy to clipboard operation
dnscrypt-proxy copied to clipboard

How to 'play nicely' on FreeBSD?

Open georgep56 opened this issue 8 years ago • 2 comments

I'm currently running the proxy on FreeBSD (actually in a chroot jail in FreeNAS) so I don't have the ability to install the 'run as a service' option.

I can start the dnscrypt-proxy binary in various ways, but could anyone tell me some way that I can control it "properly". For example once the binary is running (and has written it's PID to a file - thank you!) I can't seem to stop it nicely. It doesn't seem to respond to SIGHUP, and SIGTERM causes it to exit with nothing written to the logs and with the PID file left behind.

I'm wanting to use 'monit' to handle unexpected exits or stalls by restarting, but that needs to be able to stop and start the process (using a custom-defined command such as 'service xyz stop' or 'etc/init.d/xyz start') in response to events such as it failing to respond to a dns query or to the pidfile disappearing, which I can't currently figure out how to do. I'm happy to tinker with init scripts etc. but I still need to figure out how to interface to the dnscrypt binary.

I'd normally try to answer this myself by reading through the sources, but I'm not at all familiar with Go. Any help or suggestions welcome :-)

georgep56 avatar Mar 04 '18 13:03 georgep56

Looks like this is the same as jedisct1/dnscrypt-proxy#154 and jedisct1/dnscrypt-proxy#157 saying its an issue with another package which would lead us to kardianos/service#98. To solve it still requires Go knowledge, but it's a start.

wknd avatar Apr 02 '18 03:04 wknd

So, maybe some day in the future, but not a near future...

jedisct1 avatar Apr 03 '18 16:04 jedisct1