comparison docker/backend-dev-demo/scripts/init_script.sh @ 4195:22cd3094cd1e

docker (demo): fix starting + better UX: - Use the new `wait_for_service` option to be sure that Prosody is launched. - Use the new `init_script_path` option to initiate forums and bookmark a demo room. - Activate MUC service. - Change log formats to make them more readable.
author Goffi <goffi@goffi.org>
date Wed, 13 Dec 2023 22:00:25 +0100
parents
children 6a8cc6d668a4
comparison
equal deleted inserted replaced
4194:3dbaf179c50d 4195:22cd3094cd1e
1 #!/bin/bash
2
3 SETUP_INDICATOR="/home/libervia/.local/share/libervia/setup_complete.flag"
4 FORUMS_JSON_FILE="/home/libervia/forums.json"
5
6 if [ ! -f "$SETUP_INDICATOR" ]; then
7 echo "First run detected. Setting up the environment and configuration."
8
9 libervia-cli profile modify -D -cp demo --pwd demo
10 libervia-cli forums set -p demo < $FORUMS_JSON_FILE
11 libervia-cli bookmarks add -pdemo -a demo@chat.server1.test
12
13 touch "$SETUP_INDICATOR"
14 echo "Initial setup complete."
15 else
16 echo "Not the first run. Skipping setup."
17 fi