summaryrefslogtreecommitdiff
path: root/renew_certificate.sh
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2020-12-15 13:24:57 -0600
committerBrett Weiland <brett_weiland@bpcspace.com>2020-12-15 13:24:57 -0600
commit2895e8dec53b0e09f7d5a02bf77399a63ee91a2a (patch)
treee5b39d5e85fb5b3946bcc0ae1d5e8904171a275a /renew_certificate.sh
new file: DO_NOT_LOOSE_MEHEADmaster
new file: godaddy_add_txt.py new file: godaddy_del_txt.py new file: push.sh new file: renew_certificate.sh
Diffstat (limited to 'renew_certificate.sh')
-rwxr-xr-xrenew_certificate.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/renew_certificate.sh b/renew_certificate.sh
new file mode 100755
index 0000000..448c1aa
--- /dev/null
+++ b/renew_certificate.sh
@@ -0,0 +1,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
+
+