port changing
This commit is contained in:
parent
4eceef0502
commit
5638af5cdc
|
@ -7451,12 +7451,12 @@ 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|;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|;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|;KeyFile = /etc/ssl/private/server.key|KeyFile = /etc/ssl/private/ngircd.key|g' /etc/ngircd/ngircd.conf
|
||||||
|
sed -i "s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
||||||
if [[ $ONION_ONLY != 'yes' ]]; then
|
if [[ $ONION_ONLY != 'yes' ]]; then
|
||||||
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
|
||||||
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
|
||||||
fi
|
fi
|
||||||
sed -i ":a;N;\$!ba;s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
|
||||||
sed -i "s/;Name = #ngircd/Name = #${PROJECT_NAME}/g" /etc/ngircd/ngircd.conf
|
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/;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
|
sed -i 's/;MaxUsers = 23/MaxUsers = 23/g' /etc/ngircd/ngircd.conf
|
||||||
|
|
|
@ -591,22 +591,19 @@ function irc_via_onion {
|
||||||
if [[ $irc_onion == 'no' ]]; then
|
if [[ $irc_onion == 'no' ]]; then
|
||||||
if grep -q ";Ports = 6667" /etc/ngircd/ngircd.conf; then
|
if grep -q ";Ports = 6667" /etc/ngircd/ngircd.conf; then
|
||||||
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
|
|
||||||
else
|
else
|
||||||
sed -i "s/Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
if ! grep -q ";Ports = $IRC_PORT, $IRC_ONION_PORT" /etc/ngircd/ngircd.conf; then
|
||||||
sed -i "s/Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf
|
sed -i "s/Ports = $IRC_PORT, $IRC_ONION_PORT/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
|
||||||
|
fi
|
||||||
fi
|
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
|
||||||
|
if grep -q ";Ports = $IRC_PORT, $IRC_ONION_PORT" /etc/ngircd/ngircd.conf; then
|
||||||
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
|
||||||
if grep -q ";Ports = 6667" /etc/ngircd/ngircd.conf; 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
|
||||||
|
fi
|
||||||
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
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue