fix: jitsi-meet-tokens - the first installation check (#7618)

This commit is contained in:
emrah 2020-09-02 19:46:32 +03:00 committed by GitHub
parent d169bd5007
commit e988bf6565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -48,9 +48,9 @@ case "$1" in
db_stop db_stop
if [ -f "$PROSODY_HOST_CONFIG" ] ; then if [ -f "$PROSODY_HOST_CONFIG" ] ; then
# search for --plugin_paths, if this is not enabled this is the # search for the token auth, if this is not enabled this is the
# first time we install tokens package and needs a config change # first time we install tokens package and needs a config change
if grep -q "\-\-plugin_paths" "$PROSODY_HOST_CONFIG"; then if ! egrep -q '^\s*authentication\s*=\s*"token"' "$PROSODY_HOST_CONFIG"; then
# enable tokens in prosody host config # enable tokens in prosody host config
sed -i 's/--plugin_paths/plugin_paths/g' $PROSODY_HOST_CONFIG sed -i 's/--plugin_paths/plugin_paths/g' $PROSODY_HOST_CONFIG
sed -i 's/authentication = "anonymous"/authentication = "token"/g' $PROSODY_HOST_CONFIG sed -i 's/authentication = "anonymous"/authentication = "token"/g' $PROSODY_HOST_CONFIG