Fix Zulip bootstrap user handling
This commit is contained in:
parent
824bbd9d67
commit
b70b62dfef
3 changed files with 7 additions and 12 deletions
|
|
@ -385,8 +385,8 @@ EOF
|
|||
bootstrap_realm_if_needed() {
|
||||
local realm_exists
|
||||
realm_exists="$(
|
||||
compose run --rm -T --entrypoint bash zulip -lc \
|
||||
"su zulip -c '/home/zulip/deployments/current/manage.py list_realms'" \
|
||||
compose run --rm -T -u zulip --entrypoint bash zulip -lc \
|
||||
"/home/zulip/deployments/current/manage.py list_realms" \
|
||||
| awk '$NF == "https://${cfg.domain}" { print "yes" }'
|
||||
)"
|
||||
|
||||
|
|
@ -398,8 +398,8 @@ EOF
|
|||
export ZULIP_ADMIN_EMAIL=${lib.escapeShellArg cfg.administratorEmail}
|
||||
export ZULIP_OWNER_NAME=${lib.escapeShellArg cfg.realmOwnerName}
|
||||
|
||||
compose run --rm -T --entrypoint bash zulip -lc '
|
||||
su zulip -c "/home/zulip/deployments/current/manage.py create_realm --string-id= --password-file /data/secrets/bootstrap-owner-password --automated \"$ZULIP_REALM_NAME\" \"$ZULIP_ADMIN_EMAIL\" \"$ZULIP_OWNER_NAME\""
|
||||
compose run --rm -T -u zulip --entrypoint bash zulip -lc '
|
||||
/home/zulip/deployments/current/manage.py create_realm --string-id= --password-file /data/secrets/bootstrap-owner-password --automated "$ZULIP_REALM_NAME" "$ZULIP_ADMIN_EMAIL" "$ZULIP_OWNER_NAME"
|
||||
'
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue