service configuration files that needs to be saved just incase the server got lost someday by the cloud provider.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
656B

  1. #!/bin/bash
  2. string="$RENEWED_DOMAINS"
  3. if [[ $string == *"lawipac.com"* ]]; then
  4. echo "lawipac.com is renewed"
  5. else
  6. echo "skip lawipac.com deploy hook"
  7. exit
  8. fi
  9. scp /etc/letsencrypt/live/lawipac.com/fullchain.pem root@lawipac.com:/etc/letsencrypt/live/lawipac.com/fullchain.pem
  10. scp /etc/letsencrypt/live/lawipac.com/privkey.pem root@lawipac.com:/etc/letsencrypt/live/lawipac.com/privkey.pem
  11. ssh root@lawipac.com "service apache2 reload"
  12. #replace synology DSM certificate automatically
  13. scp /etc/letsencrypt/live/lawipac.com/*.pem root@data:/usr/syno/etc/certificate/system/default/
  14. ssh root@data "/usr/syno/sbin/synoservice --reload nginx "