diff --git a/src/freedombone-app-irc b/src/freedombone-app-irc index 60a4eed2..ba5dc53f 100755 --- a/src/freedombone-app-irc +++ b/src/freedombone-app-irc @@ -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 { diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index 4d8e3446..652c30cc 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -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