mirror of
https://git.cloudron.io/cloudron/mastodon-app.git
synced 2024-12-22 22:26:27 +00:00
disable registration in sso mode
This commit is contained in:
parent
9fb7c54624
commit
c5e7b2e6ad
1 changed files with 6 additions and 0 deletions
6
start.sh
6
start.sh
|
@ -50,6 +50,12 @@ if grep -q "^SECRET_KEY_BASE=$" /app/data/env.production; then
|
|||
|
||||
echo "==> Init database"
|
||||
HOME=/app/data SAFETY_ASSURED=1 bundle exec rails db:schema:load db:seed
|
||||
|
||||
if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
|
||||
echo "Disabling registration by default"
|
||||
PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE} \
|
||||
-c "INSERT INTO settings (var, value) VALUES ('registrations_mode', 'none')"
|
||||
fi
|
||||
fi
|
||||
|
||||
chown -R cloudron:cloudron /app/data /tmp/mastodon /run/mastodon
|
||||
|
|
Loading…
Reference in a new issue