summaryrefslogtreecommitdiff
path: root/renew_certificate.sh
blob: 448c1aa3c944717b91d0225f6bdc313404067587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
echo "Renewing SSL certificates for bpcspace.com on $(date)" | mail 19132286776@messaging.sprintpcs.com
certbot certonly --domains "bpcspace.com, *.bpcspace.com" --manual --manual-public-ip-logging-ok --agree-tos --text --manual-auth-hook "/root/scripts/maintenance/ssl_renewal/godaddy_add_txt.py" --manual-cleanup-hook "/root/scripts/maintenance/ssl_renewal/godaddy_del_txt.py" --preferred-challenges dns
error=$?
if [ $error -ne 0 ]; then
  echo "Failed with error code $error." | mail 19132286776@messaging.sprintpcs.com 
fi

systemctl restart apache2
systemctl restart filebin-server
systemctl restart postfix