diff --git a/setup/engine b/setup/engine index 67398be9..4b9357a9 100755 --- a/setup/engine +++ b/setup/engine @@ -178,6 +178,38 @@ AUTOREMOVE() sudo apt-get -y autoremove } +# Remove Package Functions +PURGENGINX() +{ + # Purge Nginx + echo -e "\033[34m Purge Nginx... \e[0m" + sudo apt-get -y purge nginx-custom || OwnError "Unable To Purge Nginx" +} + +PURGEPHP() +{ + # Purge PHP5 + echo -e "\033[34m Purge PHP5... \e[0m" + sudo apt-get -y purge 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 Purge PHP5" +} + +PURGEMYSQL() +{ + # Purge MySQL + echo -e "\033[34m Purge MySQL... \e[0m" + sudo apt-get -y purge mysql-server mysqltuner \ + || OwnError "Unable To Purge MySQL" +} + +PURGEPOSTFIX() +{ + # Purge Postfix + echo -e "\033[34m Purge Postfix... \e[0m" + sudo apt-get -y purge postfix || OwnError "Unable To Purge Postfix" +} + # GET Information Function MYSQLINFO() { @@ -442,12 +474,10 @@ then then # Purge Nginx - echo -e "\033[34m Purge Nginx... \e[0m" - sudo apt-get -y remove --purge nginx-custom || OwnError "Unable To Purge Nginx" + PURGENGINX # Remove Unwanted Packages - echo -e "\033[34m Removing Unwanted Packages... \e[0m" - sudo apt-get -y autoremove + AUTOREMOVE # Display Success Message echo -e "\033[34m Nginx Successfully Purged \e[0m" @@ -456,14 +486,11 @@ then then # Purge PHP5 - echo -e "\033[34m Purge PHP5... \e[0m" - sudo apt-get -y remove --purge 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 Purge PHP5" + PURGEPHP + REMOVEWPCLI # Remove Unwanted Packages - echo -e "\033[34m Removing Unwanted Packages... \e[0m" - sudo apt-get -y autoremove + AUTOREMOVE # Display Success Message echo -e "\033[34m PHP5 Successfully Purged \e[0m" @@ -472,13 +499,10 @@ then then # Purge MySQL - echo -e "\033[34m Purge MySQL... \e[0m" - sudo apt-get -y remove --purge mysql-server mysqltuner \ - || OwnError "Unable To Purge MySQL" + PURGEMYSQL # Remove Unwanted Packages - echo -e "\033[34m Removing Unwanted Packages... \e[0m" - sudo apt-get -y autoremove + AUTOREMOVE # Display Success Message echo -e "\033[34m MySQL Successfully Purged \e[0m" @@ -487,12 +511,10 @@ then then # Purge Postfix - echo -e "\033[34m Purge Postfix... \e[0m" - sudo apt-get -y remove --purge postfix || OwnError "Unable To Purge Postfix" + PURGEPOSTFIX # Remove Unwanted Packages - echo -e "\033[34m Removing Unwanted Packages... \e[0m" - sudo apt-get -y autoremove + AUTOREMOVE # Display Success Message echo -e "\033[34m Postfix Successfully Purged \e[0m" @@ -501,15 +523,14 @@ then then # Purge All - echo -e "\033[34m Purge Nginx PHP5 MySQL Postfix... \e[0m" - sudo apt-get -y remove --purge nginx-custom 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 mysql-server mysqltuner postfix \ - || OwnError "Unable To Purge Nginx PHP5 MySQL Postfix" - + PURGENGINX + PURGEPHP + PURGEMYSQL + PURGEPOSTFIX + REMOVEWPCLI + # Remove Unwanted Packages - echo -e "\033[34m Removing Unwanted Packages... \e[0m" - sudo apt-get -y autoremove + AUTOREMOVE # Display Success Message echo -e "\033[34m Nginx PHP5 MySQL Postfix Successfully Purged \e[0m" @@ -526,8 +547,6 @@ then - - # Easy Engine Site Settings elif [ "$1" = "site" ] then