#!/bin/sh
TOMCAT_PACKAGE=tomcat9
sudo dnf -y remove ${TOMCAT_PACKAGE}
sudo rm -rf /var/log/tomcat
sudo rm -rf /var/lib/tomcat
sudo rm -rf /usr/share/tomcat
sudo rm -rf /usr/libexec/tomcat
sudo yum -y remove mongodb-org
sudo rm -rf /var/lib/mongo
sudo rm -rf /var/log/mongodb
sudo rm -rf /etc/yum.repos.d/mongodb-org-4.4.repo
sudo rm -rf /etc/yum.repos.d/mongodb-org-8.0.repo
sudo sh -c "firewall-cmd --permanent --zone=public --remove-service=http && firewall-cmd --permanent --zone=public --remove-service=https && firewall-cmd --reload"
sudo sh -c "setsebool httpd_can_network_connect off -P"
sudo sh -c "setsebool tomcat_can_network_connect_db off -P"
