From cea085b6e0d70d51f5fd44eac01cc22617f3205b Mon Sep 17 00:00:00 2001 From: Coby Benveniste Date: Mon, 6 Jan 2025 16:33:15 +0200 Subject: [PATCH] Create and decompress to the release directory --- lib/flame_ec2/templates/start.sh.eex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/flame_ec2/templates/start.sh.eex b/lib/flame_ec2/templates/start.sh.eex index 05d3c3c..d9db83b 100644 --- a/lib/flame_ec2/templates/start.sh.eex +++ b/lib/flame_ec2/templates/start.sh.eex @@ -73,6 +73,11 @@ mkdir -p "${APP_DIR}" || { exit 1 } +mkdir -p "${RELEASE_DIR}" || { + log "Failed to create ${RELEASE_DIR}" + exit 1 +} + cd "${APP_DIR}" || { log "Failed to change to ${APP_DIR}" exit 1 @@ -96,7 +101,7 @@ else log "Failed to download from S3" exit 1 } - tar xzf release.tar.gz || { + tar xzf release.tar.gz -C ${RELEASE_DIR} || { log "Failed to extract release.tar.gz" rm -f release.tar.gz exit 1