...
2. Create a bash script to run when a certificate is updated, updating the certificates recorded in the OpenHIM system. Store this script under `/bin/certbotrenewal/updateOpenHIM.sh`
Code Block |
---|
language | bash |
---|
title | Testing Automatic Update Command |
---|
|
In Progress |
...
Code Block |
---|
language | bash |
---|
title | Testing Automatic Update Command |
---|
|
In Progress#!/bin/bash
## navigate to directory with ./certbot-auto
cd /path/to/certbot-auto
##
sudo ./certbot-auto --config /etc/letsencrypt/configs/cert.test2.ohie.org certonly --renew-hook "/bin/certbotrenewal/updateOpenHIM.sh" -n
# -n ensures a noninteractive session
# --renew-hook command only fires if a certificate is renewed
exit 0 |