Browse Source

Fix --all Installation/Remove/Purge

old-stable
Mitesh Shah 12 years ago
parent
commit
4118906052
  1. 63
      setup/engine

63
setup/engine

@ -120,6 +120,16 @@ INSTALLPOSTFIX()
sudo apt-get -y install postfix || OwnError "Unable To Install Postfix"
}
INSTALLALL()
{
# Install Nginx PHP5 MySQL Postfix
echo -e "\033[34m Installing Nginx PHP5 MySQL Postfix... \e[0m"
sudo apt-get -y install 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 Install Nginx PHP5 MySQL Postfix"
}
WP-CLI()
{
# Install WP-CLI
@ -132,6 +142,7 @@ WP-CLI()
fi
}
# Remove Package Functions
REMOVENGINX()
{
@ -164,6 +175,16 @@ REMOVEPOSTFIX()
sudo apt-get -y remove postfix || OwnError "Unable To Remove Postfix"
}
REMOVEALL()
{
# Remove Nginx PHP5 MySQL Postfix
echo -e "\033[34m Removing Nginx PHP5 MySQL Postfix... \e[0m"
sudo apt-get -y remove 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 Remove Nginx PHP5 MySQL Postfix"
}
REMOVEWPCLI()
{
# Remove WP-CLI
@ -175,10 +196,11 @@ AUTOREMOVE()
{
# Remove Unwanted Packages
echo -e "\033[34m Removing Unwanted Packages... \e[0m"
sudo apt-get -y autoremove
sudo apt-get -y autoremove || OwnError "Unable To Auto Remove"
}
# Remove Package Functions
# Purge Package Functions
PURGENGINX()
{
# Purge Nginx
@ -210,6 +232,17 @@ PURGEPOSTFIX()
sudo apt-get -y purge postfix || OwnError "Unable To Purge Postfix"
}
PURGEALL()
{
# Purge Nginx PHP5 MySQL Postfix
echo -e "\033[34m Removing Nginx PHP5 MySQL Postfix... \e[0m"
sudo apt-get -y 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"
}
# GET Information Function
MYSQLINFO()
{
@ -251,7 +284,6 @@ MYSQLINFO()
|| OwnError "Unable To Create $WPDBNAME Database"
}
WEBUSERINFO()
{
# Nginx User
@ -259,7 +291,6 @@ WEBUSERINFO()
|| OwnError "Unable To Findout Nginx Username"
}
NGINXRELOAD()
{
# Test & Reload Nginx
@ -267,7 +298,6 @@ NGINXRELOAD()
nginx -t && service nginx reload || OwnError "Unable To Reload Nginx"
}
PHPSTART()
{
# Check PHP5-FPM IS Running
@ -376,10 +406,7 @@ then
UPDATEAPT
# Install Nginx PHP5 MySQL Postfix
INSTALLNGINX
INSTALLPHP
INSTALLMYSQL
INSTALLPOSTFIX
INSTALLALL
# Install WP-CLI
WP-CLI
@ -448,12 +475,8 @@ then
elif [ "$3" = "--all" ]
then
# Remove All
REMOVENGINX
REMOVEPHP
REMOVEMYSQL
REMOVEPOSTFIX
REMOVEWPCLI
# Remove Nginx PHP5 MySQL Postfix
REMOVEALL
# Remove Unwanted Packages
AUTOREMOVE
@ -522,13 +545,9 @@ then
elif [ "$3" = "--all" ]
then
# Purge All
PURGENGINX
PURGEPHP
PURGEMYSQL
PURGEPOSTFIX
REMOVEWPCLI
# Purge Nginx PHP5 MySQL Postfix
PURGEALL
# Remove Unwanted Packages
AUTOREMOVE

Loading…
Cancel
Save