Use letsencrypt certificate for irc bouncer

This commit is contained in:
Bob Mottram 2016-10-28 15:47:08 +01:00
parent 43b33f6f5e
commit c797c0f94d
2 changed files with 11 additions and 1 deletions

View File

@ -51,7 +51,8 @@ irc_variables=(MY_USERNAME
ONION_ONLY)
function start_irc_bouncer {
su -c 'znc -p' - znc
update_default_domain
su -c 'znc' - znc
}
function stop_irc_bouncer {

View File

@ -689,6 +689,15 @@ function update_default_domain {
systemctl reload mumble
fi
fi
if [ -d /home/znc/.znc ]; then
if [[ $(cert_exists ${DEFAULT_DOMAIN_NAME} pem) == "1" ]]; then
pkill znc
cat /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem /etc/ssl/private/${DEFAULT_DOMAIN_NAME}.key > /home/znc/.znc/znc.pem
chown znc:znc /home/znc/.znc/znc.pem
chmod 700 /home/znc/.znc/znc.pem
su -c 'znc' - znc
fi
}
# NOTE: deliberately no exit 0