Skip to content

Commit

Permalink
refactor: Update install.sh script to check if coolify-db volume exis…
Browse files Browse the repository at this point in the history
…ts before generating SSH key
  • Loading branch information
andrasbacsai committed Sep 20, 2024
1 parent 760cf8a commit fa375e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions other/nightly/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,10 @@ syncSshKeys() {
fi
}

IS_COOLIFY_VOLUME_EXISTS=$(docker volume inspect coolify-db 2>/dev/null)

if [ -z "$IS_COOLIFY_VOLUME_EXISTS" ]; then
set +e
IS_COOLIFY_VOLUME_EXISTS=$(docker volume ls | grep coolify-db | wc -l)
set -e
if [ "$IS_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then
echo " - Generating SSH key."
ssh-keygen -t ed25519 -a 100 -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal -q -N "" -C coolify
chown 9999 /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal
Expand Down

0 comments on commit fa375e2

Please sign in to comment.