Skip to content

Commit

Permalink
Fix NODE_RED_INSTANCE_NUMBER value checking (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisuda committed May 28, 2024
1 parent b85c20f commit fc5a292
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## FIWARE Big Bang v0.37.0-next

- Fix NODE_RED_INSTANCE_NUMBER value checking (#375)
- Update Cygnus to 3.8.0 (#372)
- Update IoT Agent for JSON to 3.4.0 (#371)
- Update IoT Agent for UltraLight to 3.4.0 (#370)
Expand Down
15 changes: 8 additions & 7 deletions lets-fiware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,20 @@ check_iot_agent_values() {
check_node_red_values() {
logging_info "${FUNCNAME[0]}"

if [ -n "${NODE_RED_INSTANCE_NUMBER}" ]; then
if [ "${NODE_RED_INSTANCE_NUMBER}" -lt 2 ] || [ "${NODE_RED_INSTANCE_NUMBER}" -gt 20 ]; then
echo "error: NODE_RED_INSTANCE_NUMBER out of range (2-20)"
exit "${ERR_CODE}"
fi
NODE_RED_INSTANCE_NUMBER=${NODE_RED_INSTANCE_NUMBER:-1}

if [ "${NODE_RED_INSTANCE_NUMBER}" -lt 1 ] || [ "${NODE_RED_INSTANCE_NUMBER}" -gt 20 ]; then
echo "error: NODE_RED_INSTANCE_NUMBER out of range (1-20)"
exit "${ERR_CODE}"
fi

if [ "${NODE_RED_INSTANCE_NUMBER}" -ge 2 ]; then
if [ -z "${NODE_RED_INSTANCE_HTTP_ADMIN_ROOT}" ]; then
NODE_RED_INSTANCE_HTTP_ADMIN_ROOT=/node-red
fi
if [ -z "${NODE_RED_INSTANCE_USERNAME}" ]; then
NODE_RED_INSTANCE_USERNAME=node-red
fi
else
NODE_RED_INSTANCE_NUMBER=1
fi
}

Expand Down

0 comments on commit fc5a292

Please sign in to comment.