initial import
This commit is contained in:
25
dnscrypt-proxy/dnscrypt-proxy.initd
Normal file
25
dnscrypt-proxy/dnscrypt-proxy.initd
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 2017-2019 Hyperbola Project
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
command="/usr/sbin/dnscrypt-proxy"
|
||||
command_args="${DNSCRYPT_PROXY_OPTS:--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml}"
|
||||
command_background="yes"
|
||||
command_user="${DNSCRYPT_PROXY_USER:-dnscrypt}:${DNSCRYPT_PROXY_GROUP:-dnscrypt}"
|
||||
pidfile="/run/dnscrypt-proxy.pid"
|
||||
|
||||
depend() {
|
||||
use net logger
|
||||
provide dns
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
# Allow binding to 127.0.0.1:53 as non-root user
|
||||
if [ $(uname -s) = "Linux" ]; then
|
||||
/sbin/setcap 'cap_net_bind_service=+ep' /usr/sbin/dnscrypt-proxy
|
||||
fi
|
||||
|
||||
checkpath -q -d -m 0755 -o "${command_user}" /var/cache/dnscrypt-proxy
|
||||
checkpath -q -d -m 0755 -o "${command_user}" /var/log/dnscrypt-proxy
|
||||
}
|
||||
Reference in New Issue
Block a user