Bug#1059712: orphan-sysvinit-scripts: dnscrypt-proxy init script not working out of the box
Matthias Geiger
werdahias at riseup.net
Sat Dec 30 17:52:52 GMT 2023
Package: orphan-sysvinit-scripts
Version: 0.15
Severity: important
Dear Maintainer,
I installed dnscrypt-proxy alongside orphan-sysvinit-scripts. The
service does not start however. The script included in o-s-s passes
the -daemonize flag in line 44. This flag does not exist however on the
sid version of dnscrypt-proxy, thus rendering the script broken.
The systemd unit just calls this: "/usr/sbin/dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml".
Trying to reproduce that by amending the init script [see attachment]
tries to start the service but fails because listen_addresses is empty.
This is as far as I got trying to get the service to run.
best,
werdahias
-- System Information:
Debian Release: trixie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.5.0-2-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: OpenRC (via /run/openrc), PID 1: init
LSM: AppArmor: enabled
Versions of packages orphan-sysvinit-scripts depends on:
ii ucf 3.0043+nmu1
orphan-sysvinit-scripts recommends no packages.
orphan-sysvinit-scripts suggests no packages.
-- no debconf information
-------------- next part --------------
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: dnscrypt-proxy
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $network $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop dnscrypt-proxy
# Description: dnscrypt-proxy is Domain Name resolver with extra security
# features and enhanced privacy.
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions
DNSCRYPT_PROXY_BIN=/usr/sbin/dnscrypt-proxy
DNSCRYPT_PROXY_USER=_dnscrypt-proxy
DNSCRYPT_PROXY_PIDFILE=/run/dnscrypt-proxy.pid
DNSCRYPT_PROXY_CONF=/etc/dnscrypt-proxy/dnscrypt-proxy.toml
DNSCRYPT_PROXY_HOME=/run/dnscrypt-proxy
DNSCRYPT_PROXY_OPTIONS=""
DNSCRYPT_PROXY_LOCAL_ADDRESS="127.0.2.1:53"
DNSCRYPT_PROXY_RESOLVER_NAME=cisco
# Exit if the package is not installed
[ -x "${DNSCRYPT_PROXY_BIN}" ] || exit 0
[ -r "${DNSCRYPT_PROXY_CONF}" ] && . "${DNSCRYPT_PROXY_CONF}"
case "$1" in
start)
log_daemon_msg "Starting dnscrypt proxy service..." "dnscrypt-proxy"
[ -d "${DNSCRYPT_PROXY_HOME}" ] || \
mkdir -m 0555 "${DNSCRYPT_PROXY_HOME}"
if start_daemon -p "${DNSCRYPT_PROXY_PIDFILE}" ${DNSCRYPT_PROXY_BIN} \
--pidfile "${DNSCRYPT_PROXY_PIDFILE}" \
-config "${DNSCRYPT_PROXY_CONF}" \
$DNSCRYPT_PROXY_OPTIONS; then
if [ -x /sbin/resolvconf ]; then
echo "nameserver ${DNSCRYPT_PROXY_LOCAL_ADDRESS}" \
| cut -d ':' -f 1 \
| /sbin/resolvconf -a lo.dnscrypt-proxy
fi
log_success_msg
else
log_failure_msg
fi
;;
stop)
log_daemon_msg "Stopping dnscrypt proxy service..." "dnscrypt-proxy"
if [ -x /sbin/resolvconf ]; then
/sbin/resolvconf -d lo.dnscrypt-proxy
fi
if killproc -p "${DNSCRYPT_PROXY_PID}" ${DNSCRYPT_PROXY_BIN}
then
log_success_msg
else
log_failure_msg
fi
;;
restart|force-reload)
$0 stop
$0 start
;;
status)
ret=0
status_of_proc -p "${DNSCRYPT_PROXY_PIDFILE}" ${DNSCRYPT_PROXY_BIN} \
dnscrypt-proxy 2>/dev/null || ret=$?
exit $ret
;;
*)
log_action_msg "Usage: /etc/init.d/dnscrypt-proxy {start|stop|restart|force-reload|status}"
exit 1
;;
esac
exit 0
More information about the Debian-init-diversity
mailing list