onion port for irc

This commit is contained in:
Bob Mottram 2016-10-29 11:19:50 +01:00
parent 610d31845e
commit ff543a91e2
1 changed files with 17 additions and 4 deletions

View File

@ -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 '</Listener>' >> /home/znc/.znc/configs/znc.conf
echo '' >> /home/znc/.znc/configs/znc.conf
if [ $IRC_PORT -ne $IRC_ONION_PORT ]; then
echo '<Listener listener1>' >> /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 '</Listener>' >> /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