...
- Store this script under `/bin/certbot_renewal/update_OpenHIM.sh`.
- Ensure it is executable by running `sudo chmod +x /bin/certbot_renewal/update_OpenHIM.sh`.
Code Block | ||||
---|---|---|---|---|
| ||||
In Progress |
...
- Store this script under `/bin/certbot_renewal/renewal_cronjob.sh.
- Ensure it is executable by running `sudo chmod +x /bin/certbot_renewal/renewal_cronjob.sh`.
Code Block | ||||
---|---|---|---|---|
| ||||
#!/bin/bash ## navigate to directory with ./certbot-auto cd /path/to/certbot-auto ## check if the certificate is expiring soon and renew it if needed sudo ./certbot-auto --config /etc/letsencrypt/configs/cert.test2.ohie.org certonly --renew-hook "/bin/certbot_renewal/update_OpenHIM.sh" -n # -n ensures a noninteractive session # --renew-hook command only fires if a certificate is renewed exit 0 |
...
- Run `crontab -e`. Add the following contents:
Code Block | ||||
---|---|---|---|---|
| ||||
0 1,13 * * * /bin/certbot_renewal/renewal_cronjob.sh |