There seems to be a HERE missing before the second cat (about line 19).
Also the variable $PROTOCOL is used but not defined. The address created in /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml is therefore garbled and there is no output in html5-client.log.
Changing the address manually (e.g. https://...) solves the problem. So the script should do sth. like
Thank you for that hint.
After running the script (original and modified) I can't start nginx anymore.
Error message nginx: [emerg] unknown log format "postdata" in /etc/bigbluebutton/nginx/html5-client-log.nginx