Shell scripts to automate SSL certs renewal for ZNC with Certbot
NOTE: This was tested on Ubuntu 20.04 and newer
Follow instructions from here and edit the scripts paths to fit your installation.
Use znc_old.sh for ZNC verions under 1.7.0 and znc_new for ZNC 1.7.0+
- Create a folder named
scripts
inside/etc/letsencrypt
with:
mkdir -p /etc/letsencrypt/scripts
- Place one of the scripts inside
/etc/letsencrypt/scripts
- Edit the paths to fit your znc installation
- Make the script(s) executable with:
chmod +x /etc/letsncrypt/scripts/znc_new.sh
orchmod +x /etc/letsncrypt/scripts/znc_old.sh
- Request/renew your certificate with:
certbot -d znc.domain.tld --deploy-hook /etc/letsencrypt/scripts/znc_new.sh
orcertbot -d znc.domain.tld --deploy-hook /etc/letsencrypt/scripts/znc_old.sh
NOTE: You may need to execute the command twice - ENJOY!