From edd42903088c6bed6f456d47ba29adaad0e0a33c Mon Sep 17 00:00:00 2001 From: "Kipchumba C. Bett" Date: Mon, 30 Sep 2024 13:03:12 +0300 Subject: [PATCH] Use distribution name from ozone-info.json --- scripts/start.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 6da1448..40c1af3 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -29,12 +29,18 @@ if [ "$DEMO" == "true" ]; then echo "→ NUMBER_OF_DEMO_PATIENTS=$NUMBER_OF_DEMO_PATIENTS" fi -projectName="ozone" -suffix=0 +# Check if ozone-info.json exists and read project name +ozoneInfo="../$DISTRO_PATH/ozone-info.json" +if [ -f "$ozoneInfo" ]; then + projectName=$(grep -o '"name":\s*"[^\"]*"' "$ozoneInfo" | cut -d'"' -f4) +else + projectName="ozone" +fi +suffix=0 while isOzoneRunning "$projectName"; do suffix=$((suffix + 1)) - projectName="ozone_$suffix" + projectName="$projectName-$suffix" done echo "$INFO Starting Ozone project with name: $projectName"