From a976a0007d878d73275c6a96d92f27ab44ef1fd0 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Fri, 9 Sep 2022 16:27:19 +0100 Subject: [PATCH] Remove the *old* scripts dir, not the new one --- root/etc/cont-init.d/99-custom-files | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/etc/cont-init.d/99-custom-files b/root/etc/cont-init.d/99-custom-files index 9c0e18d..1ea5595 100755 --- a/root/etc/cont-init.d/99-custom-files +++ b/root/etc/cont-init.d/99-custom-files @@ -32,9 +32,9 @@ if [[ -e "${SCRIPTS_DIR}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" done # Remove legacy folder if it's empty - if [[ -e "${SCRIPTS_DIR}" ]] && [[ -z "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]]; then - echo "[custom-init] Legacy service folder ${SCRIPTS_DIR} is empty, deleting..." - rm -rf "${SCRIPTS_DIR}" + if [[ -e "${SCRIPTS_DIR_OLD}" ]] && [[ -z "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]]; then + echo "[custom-init] Legacy files folder ${SCRIPTS_DIR_OLD} is empty, deleting..." + rm -rf "${SCRIPTS_DIR_OLD}" fi elif [[ -e "${SCRIPTS_DIR_OLD}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]]; then echo "[custom-init] Files found, executing"