2 ################################################################################
4 # File: certbot_deploy.sh
6 # Description: Deploy the new certs. This script is run to deploy the new certs
7 # onto the Synology. We should have already obtained new Let's
8 # Encrypt certs and have placed them into /System/Certificates.
9 # Now we just need to restart nginx on the Synology. This works
10 # because /usr/syno/etc/certificate/_archive already has been
11 # configured to look at /System/Certificates for new certs.
13 # The restarting of nginx on Synology is large and takes time. You
14 # will not be able to get into the DSM web page and Docker will
15 # restart. Be patient and it should come back up with the new certs
18 # See also: https://help.dreamhost.com/hc/en-us/articles/217555707-DNS-API-commands
20 # Crontab: 0 0 20 Jan,Apr,Jul,Oct * certbot renew
22 # Author: Andrew@DeFaria.com
23 # Created: Mon Oct 24 11:53:38 AM PDT 2022
27 # (c) Copyright 2021, ClearSCM, Inc., all rights reserved
29 ################################################################################
30 certdir="/System/Certificates"
34 logfile="$certdir/$(basename $0).log"
43 log "Restarting nginx on Synology"
45 # At this point this is all we need to do. Set up for ssh pre-shared key such that
46 # root on your desktop can ssh into the Synology (jupiter) without a password.
48 # Note: On DSM 6.x systemctl may be called /usr/syno/sbin/synosystemctl
49 ssh root@jupiter systemctl restart nginx