|
@@ -50,17 +50,21 @@ case "$1" in
|
50
|
50
|
|
51
|
51
|
db_get jicofo/jicofo-authpassword
|
52
|
52
|
if [ -z "$RET" ] ; then
|
53
|
|
- db_input critical jicofo/jicofo-authpassword || true
|
54
|
|
- db_go
|
|
53
|
+ # if password is missing generate it, and store it
|
|
54
|
+ JICOFO_AUTH_PASSWORD=`head -c 8 /dev/urandom | tr '\0-\377' 'a-zA-Z0-9a-zA-Z0-9a-zA-Z0-9a-zA-Z0-9@@@@####'`
|
|
55
|
+ db_set jicofo/jicofo-authpassword "$JICOFO_AUTH_PASSWORD"
|
|
56
|
+ else
|
|
57
|
+ JICOFO_AUTH_PASSWORD="$RET"
|
55
|
58
|
fi
|
56
|
|
- JICOFO_AUTH_PASSWORD="$RET"
|
57
|
59
|
|
58
|
60
|
db_get jicofo/jicofosecret
|
59
|
61
|
if [ -z "$RET" ] ; then
|
60
|
|
- db_input critical jicofo/jicofosecret || true
|
61
|
|
- db_go
|
|
62
|
+ # if secret is missing generate it, and store it
|
|
63
|
+ JICOFO_SECRET=`head -c 8 /dev/urandom | tr '\0-\377' 'a-zA-Z0-9a-zA-Z0-9a-zA-Z0-9a-zA-Z0-9@@@@####'`
|
|
64
|
+ db_set jicofo/jicofosecret "$JICOFO_SECRET"
|
|
65
|
+ else
|
|
66
|
+ JICOFO_SECRET="$RET"
|
62
|
67
|
fi
|
63
|
|
- JICOFO_SECRET="$RET"
|
64
|
68
|
|
65
|
69
|
JICOFO_AUTH_DOMAIN="auth.$JVB_HOSTNAME"
|
66
|
70
|
|
|
@@ -88,6 +92,7 @@ case "$1" in
|
88
|
92
|
if [ ! -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"$JVB_HOSTNAME\"" $PROSODY_CONFIG_OLD; then
|
89
|
93
|
PROSODY_CONFIG_PRESENT="false"
|
90
|
94
|
mkdir -p /etc/prosody/conf.avail/
|
|
95
|
+ mkdir -p /etc/prosody/conf.d/
|
91
|
96
|
cp /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example $PROSODY_HOST_CONFIG
|
92
|
97
|
sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" $PROSODY_HOST_CONFIG
|
93
|
98
|
sed -i "s/jitmeetSecret/$JVB_SECRET/g" $PROSODY_HOST_CONFIG
|
|
@@ -132,7 +137,9 @@ case "$1" in
|
132
|
137
|
ln -sf /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt $AUTH_CRT_FILE
|
133
|
138
|
ln -sf /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt /usr/local/share/ca-certificates/$JICOFO_AUTH_DOMAIN.crt
|
134
|
139
|
|
135
|
|
- update-ca-certificates
|
|
140
|
+ # we need to force updating certificates, in some cases java trust
|
|
141
|
+ # store not get re-generated with latest changes
|
|
142
|
+ update-ca-certificates -f
|
136
|
143
|
|
137
|
144
|
# don't fail on systems with custom config ($PROSODY_HOST_CONFIG is missing)
|
138
|
145
|
if [ -f $PROSODY_HOST_CONFIG ]; then
|