[Unit]
Description=A tool for securing communications between a client and a DNS resolver

[Service]
Type=forking
PIDFile=/var/run/dnscrypt-proxy.pid
EnvironmentFile=/etc/conf.d/dnscrypt-proxy
ExecStartPre=/bin/rm -f /var/run/dnscrypt-proxy.pid
ExecStart=/usr/sbin/dnscrypt-proxy --daemonize \
	--pidfile=/var/run/dnscrypt-proxy.pid \
	--logfile=/var/log/dnscrypt-proxy.log \
	--local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
	--resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
	--provider-name=${DNSCRYPT_PROVIDER_NAME} \
	--provider-key=${DNSCRYPT_PROVIDER_KEY} \
	--user=${DNSCRYPT_USER}
Restart=on-abort

[Install]
WantedBy=multi-user.target
