#!/usr/bin/env bash # Asustor NAS Let's Encrypt certificate renewal deploy shell script. # Place in this directory to run on successful renwal: # /volume0/usr/builtin/etc/letsencrypt/renewal-hooks/deploy # Certbot docs: https://certbot.eff.org/docs/using.html SOURCE=/volume0/usr/builtin/etc/letsencrypt/live/nas.domain.com # letsencrypt certificate TARGET=/volume0/usr/etc/lighttpd # ADM lighttpd web server ssl cert target directory cat $SOURCE/privkey.pem $SOURCE/cert.pem > $SOURCE/lighttpd.pem cp -Lfv $SOURCE/lighttpd.pem $TARGET/lighttpd.pem /etc/init.d/S41lighttpd restart