function to remove irc server
This commit is contained in:
parent
8df611b0f9
commit
7666e778e4
|
@ -34,6 +34,23 @@ IRC_ONION_PORT=6697
|
||||||
# An optional password to log into IRC. This applies to all users
|
# An optional password to log into IRC. This applies to all users
|
||||||
IRC_PASSWORD=
|
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 {
|
function configure_firewall_for_irc {
|
||||||
if [ ! -d /etc/ngircd ]; then
|
if [ ! -d /etc/ngircd ]; then
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue