#!/sbin/openrc-run # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 RUBY_EXEC=${RUBY_EXEC:-/usr/bin/ruby} PID_FILE=/run/dnscrypt-proxy-multi.pid description="Runs multiple instances of dnscrypt-proxy" depend() { use net before dns after logger } start() { ebegin "Starting dnscrypt-proxy-multi" start-stop-daemon --start --quiet --background --pidfile "${PID_FILE}" --make-pidfile --exec "${RUBY_EXEC}" -- \ /usr/bin/dnscrypt-proxy-multi ${DNSCRYPT_PROXY_MULTI_OPTIONS} eend "$?" } stop() { ebegin "Stopping dnscrypt-proxy-multi" start-stop-daemon --stop --quiet --pidfile "${PID_FILE}" eend "$?" }