refactor: Update install.sh script to check if coolify-db volume exists before generating SSH key
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user