From 847fe09f49bd172eb008504c0536d7f845d9f1e7 Mon Sep 17 00:00:00 2001 From: Basil Hendroff <63370329+basilhendroff@users.noreply.github.com> Date: Sat, 2 Jan 2021 13:42:52 +0800 Subject: [PATCH] Check for DB_PATH and FILES_PATH Newer versions of the script no longer refer to these configuration variables. They have been replaced with WP_ROOT. If these variables are detected in the config file, inform the user to update the config file before running the script. --- wordpress-jail.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wordpress-jail.sh b/wordpress-jail.sh index 75ee049..d04729c 100755 --- a/wordpress-jail.sh +++ b/wordpress-jail.sh @@ -85,6 +85,11 @@ if [ -z "${TIME_ZONE}" ]; then exit 1 fi +if [ -n "${FILES_PATH}" ] || [ -n "${DB_PATH}" ]; then + print_err 'Configuration error: WP_ROOT replaces FILES_PATH and DB_PATH in newer script versions. Update ${CONFIG_NAME} and run the script again.' + exit 1 +fi + DB_PATH=${POOL_PATH}${WP_ROOT%/}/db FILES_PATH=${POOL_PATH}${WP_ROOT%/}/files