port changing

This commit is contained in:
Bob Mottram 2016-02-13 18:32:33 +00:00
parent b25f9b1de8
commit 6131d09119
1 changed files with 12 additions and 3 deletions

View File

@ -589,14 +589,23 @@ function irc_via_onion {
255) return;; 255) return;;
esac esac
if [[ $irc_onion == 'no' ]]; then if [[ $irc_onion == 'no' ]]; then
sed -i "s/;Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf if grep -q ";Ports = 6667"; then
sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf sed -i "s/;Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
else
sed -i "s/Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
sed -i "s/Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
fi
systemctl restart ngircd systemctl restart ngircd
dialog --title $"IRC Server" \ dialog --title $"IRC Server" \
--msgbox $"The IRC server can now be accessed via SSL at your main domain name" 8 50 --msgbox $"The IRC server can now be accessed via SSL at your main domain name" 8 50
else else
sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf if grep -q ";Ports = 6667"; then
sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
else
sed -i "s/Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
fi
systemctl restart ngircd systemctl restart ngircd
dialog --title $"IRC Server" \ dialog --title $"IRC Server" \
--msgbox $"The IRC server can now be accessed via its onion address without SSL" 8 50 --msgbox $"The IRC server can now be accessed via its onion address without SSL" 8 50