Skip to content

Commit 16e2a12

Browse files
committed
feat(api): added report_app_ready interface
1 parent 90f8dbc commit 16e2a12

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎system/cuos/api.sh‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,11 @@ EOF
206206

207207
## report_app_ready - App announces itself as ready.
208208
"report_app_ready")
209-
message="$(echo "${INPUT}" | jq -r '.message // ""')"
210-
report_info "cuos:startup:done" "Startup complete${message+" – ${message}"}"
209+
if [[ "$(state '.starting')" == "true" ]]; then
210+
message="$(echo "${INPUT}" | jq -r '.message // ""')"
211+
report_info "cuos:startup:done" "Startup complete${message+" – ${message}"}"
212+
state jq '.starting = false'
213+
fi
211214
;;
212215
## report - Write a report
213216
"report")

‎system/cuos/init.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ main() {
698698
else
699699
report_info "cuos:startup:start" "System starting up ..."
700700
state jq '.start_date = (now | todate)'
701+
state jq '.starting = true'
701702
fi
702703

703704
prepare_data_volume

0 commit comments

Comments
 (0)