Ok, I found the problem with adblock and dnscrypt-proxy 2.0. Adblock runs 4 checks to see if the dns backend (dnscrypt-proxy in this case) is running. With @InkblotAdmirer's init.d script, it passes 3.
if [ -z "${adb_dns}" ] || [ -z "${adb_dnsdeny}" ] || [ ! -d "${adb_dnsdir}" ]
# || [ ! -x "$(command -v ${adb_dns})" ]
then
f_log "err" "'${adb_dns}' not running, DNS backend not found"
fi
from the line I commented out, you can guess which it isn't passing.
Until someone comes up with a fix, which I'm sure is a simple entry to be added to the init.d file for dnscrypt-proxy v2, I'll just leave adblock.sh as shown above. Works great!
Edit2: I can't understand why the expression [ ! -x "$(command -v ${adb_dns})" ] where ${adb_dns} equals dnscrypt-proxy is returning true in adblock.sh. If I do "command -v dnscrypt-proxy" at an SSH prompt, I get a response, the directory where dnscrypt-proxy is installed. I even wrote a simple test script, and the ENTIRE expression returns false everytime:
#/bin/sh
adb_dns=dnscrypt-proxy
adb_dnsdeny="awk '{print \$0}'"
adb_dnsdir="${adb_dnsdir:-"/tmp"}"
echo "starting script"
echo
if [ -z "${adb_dns}" ] || [ -z "${adb_dnsdeny}" ] || [ ! -x "$(command -v ${adb_dns})" ] || [ ! -d "${adb_dnsdir}" ]
then
echo "it didn't work, dnscrypt-proxy isn't running"
fi
It never outputs "It didn't work, dnscrypt-proxy isn't running" unless I remove an ! or something else to make it return true. WHY DOES IT WORK HERE BUT NOT IN ADBLOCK.SH??!!? I'm driving myself crazy. It's the EXACT same expression and variables.
Just FYI, in the init.d script for dnscyrpt-proxy v2, i changed all references of dnscrypt-proxy-v2 to be simply dnscrypt-proxy.
EDIT3: I'm a dingus! I figured it out! For some reason, adblock doesn't use the default system PATH value. Instead it defines it's own PATH near the very top of adblock.sh. I added the install directory where I have dnscrypt-proxy v2 installed and now it works fine without having to comment out any lines or portions of lines.
I don't know why they coded it like that, and I hate them for it 
So everything is working fine now, with no modifications needed to adblock.sh (except for modifying the PATH variable in adblock.sh if you have dnscrypt-proxy v2 installed in a non-standard location) if you use the init.d file that @InkblotAdmirer wrote here: https://github.com/InkblotAdmirer/custo … y-v2/files as long as you change all references to dnscrypt-proxy-v2 to be dnscrypt-proxy (inversely you can change all references to dnscrypt-proxy in adblock.sh to be dnscrypt-proxy-v2).
What sucess looks like:
Fri Apr 6 00:19:24 2018 user.info adblock-[3.5.1]: start adblock processing (start)
Fri Apr 6 00:19:43 2018 user.notice dnscrypt-proxy: Starting dnscrypt-proxy instance running as nobody
Fri Apr 6 00:19:43 2018 user.info adblock-[3.5.1]: blocklist with overall 61187 domains loaded successfully (Linksys WRT1200AC, Lede SNAPSHOT r6565-fd588dbf6b)
Fri Apr 6 00:19:44 2018 daemon.notice dnscrypt-proxy[4648]: Source [public-resolvers.md] loaded
Fri Apr 6 00:19:44 2018 daemon.notice dnscrypt-proxy[4648]: dnscrypt-proxy 2.0.8
Fri Apr 6 00:19:44 2018 daemon.notice dnscrypt-proxy[4648]: Loading the set of blocking rules from [adb_list.overall]
Fri Apr 6 00:19:46 2018 daemon.notice dnscrypt-proxy[4648]: Now listening to 127.0.0.1:5353 [UDP]
Fri Apr 6 00:19:46 2018 daemon.notice dnscrypt-proxy[4648]: Now listening to 127.0.0.1:5353 [TCP]
Fri Apr 6 00:19:46 2018 daemon.notice dnscrypt-proxy[4648]: [ev-us3] OK (crypto v2) - rtt: 20ms
Fri Apr 6 00:19:47 2018 daemon.notice dnscrypt-proxy[4648]: [opennic-onic] OK (crypto v1) - rtt: 62ms
Fri Apr 6 00:19:47 2018 daemon.notice dnscrypt-proxy[4648]: [soltysiak] OK (crypto v1) - rtt: 152ms
Fri Apr 6 00:19:47 2018 daemon.notice dnscrypt-proxy[4648]: Server with the lowest initial latency: ev-us3 (rtt: 20ms)
Fri Apr 6 00:19:47 2018 daemon.notice dnscrypt-proxy[4648]: dnscrypt-proxy is ready - live servers: 3
(Last edited by starcms on 6 Apr 2018, 06:31)