Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor: Update install.sh script to check if coolify-db volume exists before generating SSH key

Andras Bacsaifa375e2fd8c4
diff --git a/other/nightly/install.sh b/other/nightly/install.sh
index 9c446e2cdb..61acbd333b 100755
--- a/other/nightly/install.sh
+++ b/other/nightly/install.sh
@@ -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/[email protected] -q -N "" -C coolify
chown 9999 /data/coolify/ssh/keys/[email protected]