6 # source application-specific settings
7 [ -f /etc
/conf.d
/dnscrypt-proxy
] && .
/etc
/conf.d
/dnscrypt-proxy
9 DNSCRYPT_PIDFILE
=${DNSCRYPT_PIDFILE:-/var/run/dnscrypt-proxy.pid}
10 DNSCRYPT_LOGFILE
=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log}
11 [ -f ${DNSCRYPT_PIDFILE} ] && PID
=`cat ${DNSCRYPT_PIDFILE}`
15 stat_busy
"Starting dnscrypt-proxy"
16 [ -z "$PID" ] && /usr
/sbin
/dnscrypt-proxy
-p ${DNSCRYPT_PIDFILE} -l ${DNSCRYPT_LOGFILE} -d -u ${DNSCRYPT_USER} \
17 -a ${DNSCRYPT_LOCALIP} -P ${DNSCRYPT_LOCALPORT}
21 add_daemon dnscrypt-proxy
26 stat_busy
"Stopping dnscrypt-proxy"
27 [ ! -z "$PID" ] && kill $PID &> /dev
/null
31 rm_daemon dnscrypt-proxy
41 echo "usage: $0 {start|stop|restart}"