| 1 | #!/sbin/openrc-run |
| 2 | # Copyright 1999-2018 Gentoo Foundation |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | |
| 5 | supervisor=supervise-daemon |
| 6 | command="/usr/bin/dnscrypt-proxy" |
| 7 | command_args="${DNSCRYPT_OPTS:--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml}" |
| 8 | command_user="${DNSCRYPT_USER:-dnscrypt}:${DNSCRYPT_GROUP:-dnscrypt}" |
| 9 | pidfile="/run/${RC_SVCNAME}.pid" |
| 10 | command_background="yes" |
| 11 | capabilities="^cap_net_bind_service" |
| 12 | |
| 13 | depend() { |
| 14 | use net logger |
| 15 | provide dns |
| 16 | } |
| 17 | |
| 18 | start_pre() { |
| 19 | checkpath -q -d -m 0775 -o "${command_user}" \ |
| 20 | /var/cache/"${RC_SVCNAME}" \ |
| 21 | /var/log/"${RC_SVCNAME}" |
| 22 | } |