irc onion port same as clearnet port

This commit is contained in:
Bob Mottram 2016-04-17 14:36:54 +01:00
parent 856d1f22a1
commit 5074772889
1 changed files with 3 additions and 21 deletions

View File

@ -90,7 +90,7 @@ CONFIGURATION_FILE="${PROJECT_NAME}.cfg"
SSH_PORT=2222
IRC_PORT=6697
IRC_ONION_PORT=8093
IRC_ONION_PORT=6697
# password used for accessing your repo mirrors
MY_MIRRORS_PASSWORD=
@ -6881,8 +6881,6 @@ function install_irc_client {
echo " address = \"${IRC_ONION_HOSTNAME}\";" >> /home/$MY_USERNAME/.irssi/config
echo " port = \"${IRC_ONION_PORT}\";" >> /home/$MY_USERNAME/.irssi/config
echo ' use_ssl = "no";' >> /home/$MY_USERNAME/.irssi/config
sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
systemctl restart ngircd
fi
echo ' chatnet = "Freedombone";' >> /home/$MY_USERNAME/.irssi/config
echo ' ssl_verify = "no";' >> /home/$MY_USERNAME/.irssi/config
@ -6971,12 +6969,8 @@ function install_irc_server {
sed -i 's|;CertFile = /etc/ssl/certs/server.crt|CertFile = /etc/ssl/certs/ngircd.crt|g' /etc/ngircd/ngircd.conf
sed -i 's|;DHFile = /etc/ngircd/dhparams.pem|DHFile = /etc/ssl/certs/ngircd.dhparam|g' /etc/ngircd/ngircd.conf
sed -i 's|;KeyFile = /etc/ssl/private/server.key|KeyFile = /etc/ssl/private/ngircd.key|g' /etc/ngircd/ngircd.conf
sed -i "s/;Ports =.*/Ports = $IRC_PORT/1" /etc/ngircd/ngircd.conf
sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
if [[ $ONION_ONLY != 'yes' ]]; then
sed -i "s/;Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
else
sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
fi
sed -i "s/;Name = #ngircd/Name = #${PROJECT_NAME}/g" /etc/ngircd/ngircd.conf
sed -i "s/;Topic = Our ngircd testing channel/Topic = ${PROJECT_NAME} chat channel/g" /etc/ngircd/ngircd.conf
sed -i 's/;MaxUsers = 23/MaxUsers = 23/g' /etc/ngircd/ngircd.conf
@ -7015,19 +7009,7 @@ function install_irc_server {
echo "IRC onion domain:$IRC_ONION_HOSTNAME" >> $COMPLETION_FILE
fi
systemctl stop ngircd
if [ ! -f /lib/systemd/system/ngircd.service ]; then
echo $'No systemd daemon found for ngircd'
exit 82528
fi
if [[ $ONION_ONLY == 'no' ]]; then
sed -i 's|ExecStart.*|ExecStart=/usr/sbin/ngircd|g' /lib/systemd/system/ngircd.service
else
sed -i 's|ExecStart.*|ExecStart=/usr/bin/torify /usr/sbin/ngircd|g' /lib/systemd/system/ngircd.service
fi
systemctl daemon-reload
systemctl start ngircd
systemctl restart ngircd
# keep the daemon running
echo '' >> /usr/bin/$WATCHDOG_SCRIPT_NAME