diff --git a/src/freedombone-app-irc b/src/freedombone-app-irc index 6d9e5082..4f0cde4e 100755 --- a/src/freedombone-app-irc +++ b/src/freedombone-app-irc @@ -34,6 +34,23 @@ IRC_ONION_PORT=6697 # An optional password to log into IRC. This applies to all users IRC_PASSWORD= +function remove_irc_server { + if ! grep -Fxq "install_irc_server" $COMPLETION_FILE; then + return + fi + systemctl stop ngircd + apt-get -y remove --purge ngircd + if [ -d /etc/ngircd ]; then + rm -rf /etc/ngircd + fi + iptables -D INPUT -p tcp --dport $IRC_PORT -j ACCEPT + iptables -D INPUT -p tcp --dport 1024:65535 --sport $IRC_PORT -j ACCEPT + function_check save_firewall_settings + save_firewall_settings + sed -i '/install_irc_server/d' $COMPLETION_FILE + sed -i '/IRC /d' $COMPLETION_FILE +} + function configure_firewall_for_irc { if [ ! -d /etc/ngircd ]; then return