onion only

This commit is contained in:
Bob Mottram 2016-02-13 14:51:17 +00:00
parent ff34daf8f0
commit cb21b6224a
1 changed files with 5 additions and 1 deletions

View File

@ -7450,7 +7450,11 @@ 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
if [[ $ONION_ONLY != 'yes' ]]; then
sed -i ":a;N;\$!ba;s/;Ports =.*/;Ports = $IRC_PORT, 9050, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf sed -i ":a;N;\$!ba;s/;Ports =.*/;Ports = $IRC_PORT, 9050, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
else
sed -i ":a;N;\$!ba;s/;Ports =.*/Ports = $IRC_PORT, 9050, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
fi
sed -i ":a;N;\$!ba;s/;Ports =.*/Ports = $IRC_PORT/2" /etc/ngircd/ngircd.conf 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