Skip to content

Commit

Permalink
delete the app folder it will be a symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
asakapab0i committed Jan 29, 2024
1 parent f524aca commit 0501c7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/update_script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ set +o allexport

cd /

# Atomically replacing the app files
# atomically replacing the app files
if file "$APP_PATH" | grep 'directory'; then
sudo rm -rf "$APP_PATH"
fi
sudo mkdir -p "${APP_PATH}_symlink_new" && sudo chown -R ec2-user.ec2-user "${APP_PATH}_symlink_new" && tar xzf "$1" -C "${APP_PATH}_symlink_new"
sudo ln -s "${APP_PATH}_symlink_new" "${APP_PATH}"
sudo rm -rf "${APP_PATH}_symlink_old" || true
Expand Down

0 comments on commit 0501c7a

Please sign in to comment.