|
@@ -591,22 +591,19 @@ function irc_via_onion {
|
591
|
591
|
if [[ $irc_onion == 'no' ]]; then
|
592
|
592
|
if grep -q ";Ports = 6667" /etc/ngircd/ngircd.conf; then
|
593
|
593
|
sed -i "s/;Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
594
|
|
- sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
595
|
594
|
else
|
596
|
|
- sed -i "s/Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
597
|
|
- sed -i "s/Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
|
595
|
+ if ! grep -q ";Ports = $IRC_PORT, $IRC_ONION_PORT" /etc/ngircd/ngircd.conf; then
|
|
596
|
+ sed -i "s/Ports = $IRC_PORT, $IRC_ONION_PORT/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
|
597
|
+ fi
|
598
|
598
|
fi
|
599
|
599
|
systemctl restart ngircd
|
600
|
600
|
dialog --title $"IRC Server" \
|
601
|
601
|
--msgbox $"The IRC server can now be accessed via SSL at your main domain name" 8 50
|
602
|
602
|
else
|
603
|
|
- sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
604
|
|
- if grep -q ";Ports = 6667" /etc/ngircd/ngircd.conf; then
|
605
|
|
- sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
606
|
|
- else
|
607
|
|
- sed -i "s/Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
|
603
|
+ if grep -q ";Ports = $IRC_PORT, $IRC_ONION_PORT" /etc/ngircd/ngircd.conf; then
|
|
604
|
+ sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
|
605
|
+ systemctl restart ngircd
|
608
|
606
|
fi
|
609
|
|
- systemctl restart ngircd
|
610
|
607
|
dialog --title $"IRC Server" \
|
611
|
608
|
--msgbox $"The IRC server can now be accessed via its onion address without SSL" 8 50
|
612
|
609
|
fi
|