Browse Source

Create Functions For Remove Packages

old-stable
Mitesh Shah 12 years ago
parent
commit
4410226dd9
  1. 89
      setup/engine

89
setup/engine

@ -44,7 +44,7 @@ OwnError()
exit 101 exit 101
} }
# GET Installation Function # Install Package Functions
PYTHONSOFTWARE() PYTHONSOFTWARE()
{ {
# Install Python Software Properties # Install Python Software Properties
@ -132,6 +132,52 @@ WP-CLI()
fi fi
} }
# Remove Package Functions
REMOVENGINX()
{
# Remove Nginx
echo -e "\033[34m Removing Nginx... \e[0m"
sudo apt-get -y remove nginx-custom || OwnError "Unable To Remove Nginx"
}
REMOVEPHP()
{
# Remove PHP5
echo -e "\033[34m Removing PHP5... \e[0m"
sudo apt-get -y remove php5-common php5-mysql php5-xmlrpc \
php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear \
php5-dev php5-imap php5-mcrypt || OwnError "Unable To Remove PHP5"
}
REMOVEMYSQL()
{
# Remove MySQL
echo -e "\033[34m Removing MySQL... \e[0m"
sudo apt-get -y remove mysql-server mysqltuner \
|| OwnError "Unable To Remove MySQL"
}
REMOVEPOSTFIX()
{
# Remove Postfix
echo -e "\033[34m Removing Postfix... \e[0m"
sudo apt-get -y remove postfix || OwnError "Unable To Remove Postfix"
}
REMOVEWPCLI()
{
# Remove WP-CLI
echo -e "\033[34m Removing WP-CLI... \e[0m"
sudo rm -rf /root/wp-cli || OwnError "Unable To Remove WP-CLI"
}
AUTOREMOVE()
{
# Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m"
sudo apt-get -y autoremove
}
# GET Information Function # GET Information Function
MYSQLINFO() MYSQLINFO()
{ {
@ -322,12 +368,10 @@ then
then then
# Remove Nginx # Remove Nginx
echo -e "\033[34m Removing Nginx... \e[0m" REMOVENGINX
sudo apt-get -y remove nginx-custom || OwnError "Unable To Remove Nginx"
# Remove Unwanted Packages # Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m" AUTOREMOVE
sudo apt-get -y autoremove
# Display Success Message # Display Success Message
echo -e "\033[34m Nginx Successfully Removed \e[0m" echo -e "\033[34m Nginx Successfully Removed \e[0m"
@ -336,14 +380,11 @@ then
then then
# Remove PHP5 # Remove PHP5
echo -e "\033[34m Removing PHP5... \e[0m" REMOVEPHP
sudo apt-get -y remove php5-common php5-mysql php5-xmlrpc \ REMOVEWPCLI
php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear \
php5-dev php5-imap php5-mcrypt || OwnError "Unable To Remove PHP5"
# Remove Unwanted Packages # Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m" AUTOREMOVE
sudo apt-get -y autoremove
# Display Success Message # Display Success Message
echo -e "\033[34m PHP5 Successfully Removed \e[0m" echo -e "\033[34m PHP5 Successfully Removed \e[0m"
@ -352,13 +393,10 @@ then
then then
# Remove MySQL # Remove MySQL
echo -e "\033[34m Removing MySQL... \e[0m" REMOVEMYSQL
sudo apt-get -y remove mysql-server mysqltuner \
|| OwnError "Unable To Remove MySQL"
# Remove Unwanted Packages # Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m" AUTOREMOVE
sudo apt-get -y autoremove
# Display Success Message # Display Success Message
echo -e "\033[34m MySQL Successfully Removed \e[0m" echo -e "\033[34m MySQL Successfully Removed \e[0m"
@ -367,12 +405,10 @@ then
then then
# Remove Postfix # Remove Postfix
echo -e "\033[34m Removing Postfix... \e[0m" REMOVEPOSTFIX
sudo apt-get -y remove postfix || OwnError "Unable To Remove Postfix"
# Remove Unwanted Packages # Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m" AUTOREMOVE
sudo apt-get -y autoremove
# Display Success Message # Display Success Message
echo -e "\033[34m Postfix Successfully Removed \e[0m" echo -e "\033[34m Postfix Successfully Removed \e[0m"
@ -381,15 +417,14 @@ then
then then
# Remove All # Remove All
echo -e "\033[34m Removing Nginx PHP5 MySQL Postfix... \e[0m" REMOVENGINX
sudo apt-get -y remove nginx-custom php5-common php5-mysql php5-xmlrpc \ REMOVEPHP
php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear \ REMOVEMYSQL
php5-dev php5-imap php5-mcrypt mysql-server mysqltuner postfix \ REMOVEPOSTFIX
|| OwnError "Unable To Remove Nginx PHP5 MySQL Postfix" REMOVEWPCLI
# Remove Unwanted Packages # Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m" AUTOREMOVE
sudo apt-get -y autoremove
# Display Success Message # Display Success Message
echo -e "\033[34m Nginx PHP5 MySQL Postfix Successfully Removed \e[0m" echo -e "\033[34m Nginx PHP5 MySQL Postfix Successfully Removed \e[0m"

Loading…
Cancel
Save