From 28dc62e802da3de7628522c2082055c8eff266b4 Mon Sep 17 00:00:00 2001 From: Edi Septriyanto Date: Sat, 18 Dec 2021 20:54:34 +0700 Subject: [PATCH] Update removal scripts --- remove.sh | 12 ++++++------ scripts/cleanup_server.sh | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/remove.sh b/remove.sh index 6612b83..f0e362e 100755 --- a/remove.sh +++ b/remove.sh @@ -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 "" diff --git a/scripts/cleanup_server.sh b/scripts/cleanup_server.sh index f2d453d..806a8c5 100755 --- a/scripts/cleanup_server.sh +++ b/scripts/cleanup_server.sh @@ -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"}