A simple bash script to update the cloudflared binary in conjunction to the guide used at https://docs.pi-hole.net/guides/dns/cloudflared/ (manual installation steps).
This requires you to have cloudflared manually installed under /usr/local/bin/cloudflared and a systemd service for it called cloudflared.
Modify the link to fit your arch and download the script (link sources further down):
curl -L -o ./cloudflared-updater https://github.com/chippey5/cloudflared-updater/releases/latest/download/cloudflared-updater_{ARCH}
Make the file executable
chmod +x cloudflared-updater
Add the script to crontab as root. Logs will show up at /var/log/cloudflared-updater.log
-
ARMv6/ARMv7/ARMv8 (32-bit): https://github.com/chippey5/cloudflared-updater/releases/latest/download/cloudflared-updater_armv6
All the cloudflared releases are available at https://github.com/cloudflare/cloudflared/releases/
sudo bash /path/to/cloudflared-updater
sudo crontab -e
Add the following to the bottom of the list and modify the path:
0 0 * * 0 /bin/bash /path/to/cloudflared-updater