Use letsencrypt certificate for irc bouncer
This commit is contained in:
parent
43b33f6f5e
commit
c797c0f94d
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue