Skip to content

Commit

Permalink
Use distribution name from ozone-info.json
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliouzbett committed Sep 30, 2024
1 parent 06e4e1e commit edd4290
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit edd4290

Please sign in to comment.