Expected Behaviour:
It should doing updates.
Actual Behaviour:
Dnscrypt and Pi Hole doesn't do automatics updates anymore.
I was having problem with pi hole (see this issue) : [FATAL] listen udp bind: address already in use - #3 by jfb
So as recommanded i've open an issue at Dnscrypt github and i solved the problem, but instead of following this tutorial (that i couldn't get to work) i've changed make those changes (see the link below) :
https://github.com/DNSCrypt/dnscrypt-proxy/issues/1198#issuecomment-589353199
This is the script for automatic update for dnscrypt :
And this my actual script that is executed from a sudo crontabe -e :
INSTALL_DIR="/opt/dnscrypt-proxy"
LATEST_URL="https://api.github.com/repos/jedisct1/dnscrypt-proxy/releases/latest"
Update() {
workdir="$(mktemp -d)"
curl -sL $(curl -sL "$LATEST_URL" |
grep dnscrypt-proxy-linux_arm- | grep browser_download_url | head -1 | cut -d " -f 4) |
tar xz -C "$workdir" -f - linux-arm/dnscrypt-proxy &&
[ -x linux-arm/dnscrypt-proxy ] &&
mv -f "${INSTALL_DIR}/dnscrypt-proxy" "${INSTALL_DIR}/dnscrypt-proxy.old" : &&
mv -f "${workdir}/linux-x86_64/dnscrypt-proxy" "${INSTALL_DIR}/" &&
cd "$INSTALL_DIR" && rm -fr "$workdir" &&
./dnscrypt-proxy -check && ./dnscrypt-proxy -service install 2>/dev/null : &&
./dnscrypt-proxy -service restart || ./dnscrypt-proxy -service start
}
lversion=$("${INSTALL_DIR}/dnscrypt-proxy" -version)
rmersion=$(curl -sL "$LATEST_URL" | grep "tag_name" | head -1 | cut -d " -f 4)
[ -z "$lversion" ] && exit 1
[ -z "$rmersion" ] && exit 1
echo locally installed
echo "$lversion"
echo remote git version
echo "$rmersion"
if [ "$rmersion" != "$lversion" ]; then
echo "Updating" && Update
else
echo "No Update Needed"
fi
And also this is my crontab for pi hole
~ $ sudo cat /etc/cron.d/pihole
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Updates ad sources every week
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
#
#
#
# This file is under source-control of the Pi-hole installation and update
# scripts, any changes made to this file will be overwritten when the softare
# is updated or re-installed. Please make any changes to the appropriate crontab
# or other cron file snippets.
# Pi-hole: Update the ad sources once a week on Sunday at a random time in the
# early morning. Download any updates from the adlists
# Squash output to log, then splat the log to stdout on error to allow for
# standard crontab job error handling.
49 3 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updateGravity >/var/log/pihole_updateGravity.log || cat /var/log/pihole_updateGravity.log
# Pi-hole: Flush the log daily at 00:00
# The flush script will use logrotate if available
# parameter "once": logrotate only once (default is twice)
# parameter "quiet": don't print messages
00 00 * * * root PATH="$PATH:/usr/local/bin/" pihole flush once quiet
@reboot root /usr/sbin/logrotate /etc/pihole/logrotate
# Pi-hole: Grab local version and branch every 10 minutes
*/10 * * * * root PATH="$PATH:/usr/local/bin/" pihole updatechecker local
# Pi-hole: Grab remote version every 24 hours
39 18 * * * root PATH="$PATH:/usr/local/bin/" pihole updatechecker remote
Please let me know if i've to make changes to make the updates working again (actually i'm not quite sure that dnscrypt script has worked one day).
Big thanks to you.