function to remove irc server

This commit is contained in:
Bob Mottram 2016-07-03 22:21:50 +01:00
parent 8df611b0f9
commit 7666e778e4
1 changed files with 17 additions and 0 deletions

View File

@ -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