doh-hottis-de/renewcerts.sh

16 lines
415 B
Bash
Raw Permalink Normal View History

2021-10-29 15:00:37 +02:00
#!/bin/bash
echo "Running certbot"
/usr/bin/certbot renew --standalone
echo "Copying cert and key to unbound"
cp /etc/letsencrypt/live/doh.hottis.de/privkey.pem /etc/unbound/privkey.pem
chown unbound:unbound /etc/unbound/privkey.pem
cp /etc/letsencrypt/live/doh.hottis.de/fullchain.pem /etc/unbound/pubcert.pem
chown unbound:unbound /etc/unbound/pubcert.pem
echo "Restarting unbound"
systemctl restart unbound