Update removal scripts

This commit is contained in:
Edi Septriyanto
2021-12-18 20:54:34 +07:00
parent c10ad81322
commit 28dc62e802
2 changed files with 16 additions and 16 deletions

View File

@@ -67,18 +67,18 @@ if [ -f ./scripts/remove_nginx.sh ]; then
. ./scripts/remove_nginx.sh
fi
### Remove MySQL ###
if [ -f ./scripts/remove_mariadb.sh ]; then
echo ""
. ./scripts/remove_mariadb.sh
fi
### Remove PHP & FPM ###
if [ -f ./scripts/remove_php.sh ]; then
echo ""
. ./scripts/remove_php.sh
fi
### Remove MySQL ###
if [ -f ./scripts/remove_mariadb.sh ]; then
echo ""
. ./scripts/remove_mariadb.sh
fi
### Remove PHP & FPM ###
if [ -f ./scripts/remove_memcached.sh ]; then
echo ""

View File

@@ -83,16 +83,6 @@ if [[ -n $(command -v nginx) ]]; then
. "${SCRIPTS_DIR}/remove_nginx.sh"
fi
# Remove Mysql service if exists.
if [[ -n $(command -v mysqld) ]]; then
warning -e "\nMariaDB (MySQL) database server already installed. Should we remove it?"
echo "Backup your database before continue!"
# shellchechk source=scripts/remove_mariadb.sh
# shellcheck disable=SC1091
. "${SCRIPTS_DIR}/remove_mariadb.sh"
fi
# Remove PHP & FPM service if exists.
PHPv=${DEFAULT_PHP_VERSION:-"7.4"}
@@ -105,6 +95,16 @@ if [[ -n $(command -v "php${PHPv}") ]]; then
. "${SCRIPTS_DIR}/remove_php.sh" "${PHPv}"
fi
# Remove Mysql service if exists.
if [[ -n $(command -v mysqld) ]]; then
warning -e "\nMariaDB (MySQL) database server already installed. Should we remove it?"
echo "Backup your database before continue!"
# shellchechk source=scripts/remove_mariadb.sh
# shellcheck disable=SC1091
. "${SCRIPTS_DIR}/remove_mariadb.sh"
fi
# Remove default lemper account if exists.
USERNAME=${LEMPER_USERNAME:-"lemper"}