diff --git a/src/freedombone-app-irc b/src/freedombone-app-irc index a5182ae6..1ce1a939 100755 --- a/src/freedombone-app-irc +++ b/src/freedombone-app-irc @@ -34,7 +34,7 @@ IN_DEFAULT_INSTALL=1 SHOW_ON_ABOUT=1 IRC_BOUNCER_PORT=6697 -IRC_ONION_PORT=$IRC_BOUNCER_PORT +IRC_ONION_PORT=8098 IRC_PORT=6698 # An optional password to log into IRC. This applies to all users @@ -59,10 +59,10 @@ function start_irc_bouncer { update_default_domain if [ ! -f /home/znc/.znc/znc.pem ]; then # no certificate exists - su -c 'znc -p' - znc + su -c 'proxychains znc -p' - znc else # an existing certificate is being used - su -c 'znc' - znc + su -c 'proxychains znc' - znc fi } @@ -578,7 +578,7 @@ function install_irc_bouncer { return fi - apt-get -yq -t jessie-backports install znc + apt-get -yq -t jessie-backports install znc proxychains adduser --disabled-login --gecos 'znc' znc @@ -605,6 +605,19 @@ function install_irc_bouncer { echo '' >> /home/znc/.znc/configs/znc.conf echo '' >> /home/znc/.znc/configs/znc.conf + if [ $IRC_PORT -ne $IRC_ONION_PORT ]; then + echo '' >> /home/znc/.znc/configs/znc.conf + echo ' AllowIRC = true' >> /home/znc/.znc/configs/znc.conf + echo ' AllowWeb = false' >> /home/znc/.znc/configs/znc.conf + echo ' IPv4 = true' >> /home/znc/.znc/configs/znc.conf + echo ' IPv6 = true' >> /home/znc/.znc/configs/znc.conf + echo " Port = ${IRC_ONION_PORT}" >> /home/znc/.znc/configs/znc.conf + echo ' SSL = false' >> /home/znc/.znc/configs/znc.conf + echo ' URIPrefix = /' >> /home/znc/.znc/configs/znc.conf + echo '' >> /home/znc/.znc/configs/znc.conf + echo '' >> /home/znc/.znc/configs/znc.conf + fi + chown -R znc:znc /home/znc/.znc add_user_irc_bouncer "${MY_USERNAME}" "${IRC_PASSWORD}" true