Function to remove xmpp
This commit is contained in:
parent
eadc7fc342
commit
ce9091d34a
|
@ -119,6 +119,40 @@ function update_prosody_modules {
|
|||
fi
|
||||
}
|
||||
|
||||
function remove_xmpp_client {
|
||||
if ! grep -Fxq "install_xmpp_client" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
apt-get -y remove --purge profanity
|
||||
sed '/install_xmpp_client/d' $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function remove_xmpp {
|
||||
remove_xmpp_client
|
||||
if ! grep -Fxq "install_xmpp" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
iptables -D INPUT -p tcp --dport 5222:5223 -j ACCEPT
|
||||
iptables -D INPUT -p tcp --dport 5269 -j ACCEPT
|
||||
iptables -D INPUT -p tcp --dport 5280:5281 -j ACCEPT
|
||||
function_check save_firewall_settings
|
||||
save_firewall_settings
|
||||
|
||||
function_check remove_onion_service
|
||||
remove_onion_service xmpp 5222 5223 5269
|
||||
|
||||
apt-get -y remove --purge prosody prosody-modules
|
||||
if [ -d $INSTALL_DIR/prosody-modules ]; then
|
||||
rm -rf $INSTALL_DIR/prosody-modules
|
||||
fi
|
||||
if [ -d /etc/prosody ]; then
|
||||
rm -rf /etc/prosody
|
||||
fi
|
||||
|
||||
sed '/install_xmpp/d' $COMPLETION_FILE
|
||||
sed '/XMPP /d' $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_xmpp {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue