certbot-ssl.sh: initial commit

This commit is contained in:
Aminda Suomalainen 2019-07-01 14:25:05 +03:00
parent 19a8c9f5c3
commit 2ebe287ce4
No known key found for this signature in database
GPG Key ID: 0C207F07B2F32B67

19
bash/certbot-ssl.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# WARNING!
# Check file permissions very carefully so other users cannot access the
# certificate copies.
# Used with crontab.
# Syncplay
cp /etc/letsencrypt/live/relpda.mikaela.info/* /opt/syncplay/ssl/
chown -R syncplay:root /opt/syncplay/ssl
# Mumble
cp /etc/letsencrypt/live/relpda.mikaela.info/* /var/lib/mumble-server/ssl/
chown -R mumble-server:mumble-server /var/lib/mumble-server/ssl/
# 1.3.0+ reloads certificate without restart on SIGUSR1
pkill $(cat /var/run/mumble-server/mumble-server.pid) -USR1
# ZNC via https://wiki.znc.in/Signed_SSL_certificate#Certbot
cat /etc/letsencrypt/live/relpda.mikaela.info/{privkey,fullchain}.pem > /home/znc/.znc/znc.pem