Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(docker): use INIT_ADMIN env var to control admin account creation

johavenc6bb3589e832
diff --git a/scripts/docker-sync-in-server.sh b/scripts/docker-sync-in-server.sh
index eb3fd007..9ebc7d63 100755
--- a/scripts/docker-sync-in-server.sh
+++ b/scripts/docker-sync-in-server.sh
@@ -9,7 +9,8 @@ if [ "${SKIP_INIT}" != "true" ]; then
echo "Error: unable to migrate database schema !" >&2
exit 1
fi
- if [ "${SKIP_INIT_ADMIN}" != "true" ]; then
+ # if INIT_ADMIN is defined (regardless of its value)
+ if [ "${INIT_ADMIN+x}" ]; then
# create an administrator account if one doesn’t already exist, using the supplied login and password when provided
if ! node server/infrastructure/database/scripts/create-user.js --role admin --login "${INIT_ADMIN_LOGIN}" --password "${INIT_ADMIN_PASSWORD}"; then
echo "Error: unable to create administrator !" >&2