diff --git a/src/freedombone-app-mumble b/src/freedombone-app-mumble index 038ae22e..196f152b 100755 --- a/src/freedombone-app-mumble +++ b/src/freedombone-app-mumble @@ -37,6 +37,26 @@ VOIP_PORT=64738 VOIP_DATABASE="mumble-server.sqlite" VOIP_CONFIG_FILE="mumble-server.ini" +function remove_mumble { + if !grep -Fxq "install_mumble" $COMPLETION_FILE; then + if ! grep -Fxq "install_voip" $COMPLETION_FILE; then + return + fi + fi + apt-get -y remove --purge mumble-server + iptables -D INPUT -p udp --dport $VOIP_PORT -j ACCEPT + iptables -D INPUT -p tcp --dport $VOIP_PORT -j ACCEPT + function_check save_firewall_settings + save_firewall_settings + if [ -f /etc/mumble-server.ini ]; then + rm /etc/mumble-server.ini + fi + sed -i '/install_mumble/d' $COMPLETION_FILE + sed -i '/install_voip/d' $COMPLETION_FILE + sed -i '/configure_firewall_for_voip/d' $COMPLETION_FILE + sed -i '/VoIP /d' $COMPLETION_FILE +} + function get_voip_server_password { if [ -f /home/$MY_USERNAME/README ]; then if grep -q "VoIP server password" /home/$MY_USERNAME/README; then