From 90ea4ed2386296fa9df6e20d014126819e425e59 Mon Sep 17 00:00:00 2001 From: Basil Hendroff <63370329+basilhendroff@users.noreply.github.com> Date: Sat, 2 Jan 2021 14:55:07 +0800 Subject: [PATCH] New installation check Improved check for existing install based on WP_ROOT. --- wordpress-jail.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wordpress-jail.sh b/wordpress-jail.sh index d07d19a..5ba0964 100755 --- a/wordpress-jail.sh +++ b/wordpress-jail.sh @@ -106,9 +106,9 @@ then fi # Check that this is a new installation -if [ "$(ls -A "${FILES_PATH}")" ] || [ "$(ls -A "${DB_PATH}")" ] +if [ -e "${POOL_PATH}${WP_ROOT}" ] then - print_err "This script only works for new installations. The script cannot proceed if FILES_PATH and DB_PATH are not both empty." + print_err "This script only works for new installations. The script cannot proceed if WP_ROOT exists." exit 1 fi