Spaces:
Running
Running
RemiFabre commited on
Commit ·
4d899ed
1
Parent(s): f3a7d03
Fix deploy script curl to show daemon response on failure
Browse filesThe -sf flag was silently swallowing error responses.
Now captures full response and checks for error field.
- deploy_wireless.sh +3 -3
deploy_wireless.sh
CHANGED
|
@@ -98,13 +98,13 @@ sleep 1
|
|
| 98 |
# slouch_detector as a managed subprocess with the correct venv and
|
| 99 |
# ReachyMini connection context.
|
| 100 |
echo "==> Starting slouch_detector via daemon..."
|
| 101 |
-
RESP=$(ssh "${REMOTE}" "curl -
|
| 102 |
-
if
|
| 103 |
echo " ERROR: Failed to start slouch_detector via daemon API."
|
| 104 |
echo " Response: ${RESP}"
|
| 105 |
exit 1
|
| 106 |
fi
|
| 107 |
-
echo " Started."
|
| 108 |
|
| 109 |
echo ""
|
| 110 |
echo "Web UI: http://${HOST}:8042"
|
|
|
|
| 98 |
# slouch_detector as a managed subprocess with the correct venv and
|
| 99 |
# ReachyMini connection context.
|
| 100 |
echo "==> Starting slouch_detector via daemon..."
|
| 101 |
+
RESP=$(ssh "${REMOTE}" "curl -s -X POST ${DAEMON_API}/start-app/slouch_detector 2>&1")
|
| 102 |
+
if echo "$RESP" | grep -q '"error"' && ! echo "$RESP" | grep -q '"error":null'; then
|
| 103 |
echo " ERROR: Failed to start slouch_detector via daemon API."
|
| 104 |
echo " Response: ${RESP}"
|
| 105 |
exit 1
|
| 106 |
fi
|
| 107 |
+
echo " Started. (${RESP})"
|
| 108 |
|
| 109 |
echo ""
|
| 110 |
echo "Web UI: http://${HOST}:8042"
|