Skip to content

Commit cd75ef7

Browse files
committed
This should fix the problems with the automatic user creation
1 parent b617f0f commit cd75ef7

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
/home/zulip/deployments/current/manage.py create_user --this-user-has-accepted-the-tos "$ZULIP_USER_EMAIL" "$ZULIP_USER_FULLNAME" --domain "$ZULIP_USER_DOMAIN" || :
4+
/home/zulip/deployments/current/manage.py knight "$ZULIP_USER_EMAIL" -f || :
5+
/home/zulip/deployments/current/manage.py shell <<EOF
6+
from zerver.decorator import get_user_profile_by_email
7+
User = get_user_profile_by_email('[email protected]')
8+
User.set_password('$ZULIP_USER_PASSWORD')
9+
User.save()
10+
EOF
11+
rm -rf /etc/supervisor/conf.d/zulip_postsetup.conf
12+
exit 0
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
[program:zulip-postsetup]
2-
command = bash -c "/usr/local/bin/zulipCreateUser.sh"
1+
[program:zulip-postsetup-create_user]
2+
command = bash -c "sleep 8;/opt/setupZulipUser.sh"
3+
user=zulip
34
stdout_events_enabled=true
45
stderr_events_enabled=true
56
autorestart = false

includes/zulip-puppet/files/zulipCreateUser.sh

-16
This file was deleted.

includes/zulip-puppet/manifests/voyager.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
mode => 644,
4545
source => "puppet:///modules/zulip/supervisor/conf.d/zulip_postsetup.conf",
4646
}
47-
file { "/usr/local/bin/zulipPostSetup.sh":
47+
file { "/opt/setupZulipUser.sh":
4848
ensure => file,
4949
owner => "root",
5050
group => "root",
5151
mode => 755,
52-
source => "puppet:///modules/zulip/zulipPostSetup.sh",
52+
source => "puppet:///modules/zulip/setupZulipUser.sh",
5353
}
5454
}

0 commit comments

Comments
 (0)