add script for deploying certbot replication setup

This commit is contained in:
Daniel Micay 2025-10-30 13:54:34 -04:00
parent e6db6a15e6
commit f9430a1aeb
4 changed files with 43 additions and 0 deletions

17
certbot-replicate Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
status=0
for mirror in $(cat /etc/mirrors); do
echo
echo Deploying to $mirror
echo
rsync -acv --delete --fsync --preallocate /etc/letsencrypt/ $mirror:/etc/letsencrypt &&
ssh root@$mirror nginx -s reload ||
status=1
done
exit $status