add certbot and web deployment scripts

This commit is contained in:
Daniel Micay 2025-10-19 12:21:05 -04:00
parent e84c84db6b
commit 04d0489e57
3 changed files with 55 additions and 0 deletions

21
deploy-certbot Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
. shared.sh
. hosts.sh
for host in ${hosts_certbot[@]}; do
remote=root@$host
echo
echo $host
echo
rsync etc/logrotate.d/letsencrypt $remote:/etc/logrotate.d/
rsync -r etc/systemd/system/certbot-renew.service.d/ $remote:/etc/systemd/system/certbot-renew.service.d/
ssh $remote "systemctl daemon-reload &&
systemctl enable --now certbot-renew.timer &&
mkdir -vp /srv/certbot &&
chmod -c 750 /srv/certbot &&
chown -c root:http /srv/certbot"
done