mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
In scripts/lib/create-zulip-admin line 3:
if ([ "$ZULIP_USER_CREATION_ENABLED" == "True" ] || [ "$ZULIP_USER_CREATION_ENABLED" == "true" ]) && \
^-- SC2235: Use { ..; } instead of (..) to avoid subshell overhead.
In scripts/lib/create-zulip-admin line 4:
([ -z "$ZULIP_USER_DOMAIN" ] || \
^-- SC2235: Use { ..; } instead of (..) to avoid subshell overhead.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
16 lines
650 B
Bash
Executable File
16 lines
650 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if { [ "$ZULIP_USER_CREATION_ENABLED" == "True" ] || [ "$ZULIP_USER_CREATION_ENABLED" == "true" ]; } && \
|
|
{ [ -z "$ZULIP_USER_DOMAIN" ] || \
|
|
[ -z "$ZULIP_USER_EMAIL" ] || \
|
|
[ -z "$ZULIP_USER_FULLNAME" ] || \
|
|
[ -z "$ZULIP_USER_PASS" ]; }; then
|
|
echo "No zulip user configuration given."
|
|
exit 1
|
|
fi
|
|
set +e
|
|
sudo -H -u zulip -g zulip bash <<BASH
|
|
/home/zulip/deployments/current/manage.py create_user --this-user-has-accepted-the-tos --realm "$ZULIP_USER_DOMAIN" --password "$ZULIP_USER_PASS" "$ZULIP_USER_EMAIL" "$ZULIP_USER_FULLNAME"
|
|
/home/zulip/deployments/current/manage.py knight "$ZULIP_USER_EMAIL" -f
|
|
BASH
|