Remove the *old* scripts dir, not the new one

pull/120/head
TheSpad 2022-09-09 16:27:19 +01:00
rodzic c8f582c3a9
commit a976a0007d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 08F06191F4587860
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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"