From: Giorgio Ravera Date: Mon, 18 Nov 2019 17:04:05 +0000 (+0100) Subject: Added QNAP NAS to update_certificate script X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=3de45939647191c66cf3e188bce31087023552fc;p=scripts.git Added QNAP NAS to update_certificate script --- diff --git a/update_certificate b/update_certificate index 1ea4e59..11f64c6 100755 --- a/update_certificate +++ b/update_certificate @@ -37,8 +37,22 @@ ssh $user@$host fwconsole sysadmin updatecert #ssh $user@$host systemctl reload httpd.service echo "" +# NAS +echo " ------------------------------- " +echo "| Updating NAS Certificate |" +echo " ------------------------------- " +host="nas.giorgioravera.it" +user="admin" +scp /etc/letsencrypt/live/server.giorgioravera.it/cert.pem $user@$host:/etc/stunnel +scp /etc/letsencrypt/live/server.giorgioravera.it/privkey.pem $user@$host:/etc/stunnel +ssh $user@$host 'cat /etc/stunnel/privkey.pem > /etc/stunnel/stunnel.pem' +ssh $user@$host 'cat /etc/stunnel/cert.pem >> /etc/stunnel/stunnel.pem' +ssh $user@$host /etc/init.d/stunnel.sh restart +echo "" + # Firewall echo " ------------------------------- " echo "| Updating Firewall Certificate |" echo " ------------------------------- " update_certificate_firewall +echo ""