Skip to content

Commit

Permalink
Use sudo for user switching in createZulipAdmin script
Browse files Browse the repository at this point in the history
Removed removed argument for create_realm in createZulipAdmin
  • Loading branch information
galexrt committed Jun 9, 2017
1 parent fe80cb8 commit f8b142b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/createZulipAdmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ if ([ "$ZULIP_USER_CREATION_ENABLED" == "True" ] && [ "$ZULIP_USER_CREATION_ENAB
fi
set +e
# Doing everything in python, even I never coded in python #YOLO
sudo su zulip <<BASH
/home/zulip/deployments/current/manage.py create_realm --string_id="$ZULIP_USER_DOMAIN" --name="$ZULIP_USER_DOMAIN" -d "$ZULIP_USER_DOMAIN"
sudo -H -u zulip -g zulip bash <<BASH
/home/zulip/deployments/current/manage.py create_realm --string_id="$ZULIP_USER_DOMAIN" --name="$ZULIP_USER_DOMAIN"
/home/zulip/deployments/current/manage.py create_user --this-user-has-accepted-the-tos --realm "$ZULIP_USER_DOMAIN" "$ZULIP_USER_EMAIL" "$ZULIP_USER_FULLNAME"
/usr/bin/expect <<EOF
set timeout 5
Expand Down

0 comments on commit f8b142b

Please sign in to comment.