bugfixes/prepare_for_first_unit (#8)

- update ui
- implement different features like restart
- bugfixes

Co-authored-by: pstruebi <struebin.patrick.com>
Reviewed-on: https://gitea.pstruebi.xyz/auracaster/bumble-auracast/pulls/8
This commit was merged in pull request #8.
This commit is contained in:
2025-10-06 12:16:39 +02:00
parent a9ea04ed87
commit 430fb1009d
15 changed files with 832 additions and 453 deletions

26
src/scripts/hit_status.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Usage: ./hit_status.sh [COUNT] [SLEEP_SECONDS]
# Always targets http://127.0.0.1:5000/status
# Defaults: COUNT=100 SLEEP_SECONDS=0
# Example: ./hit_status.sh 100 0.05
set -euo pipefail
URL="http://127.0.0.1:5000/status"
COUNT="${1:-100}"
SLEEP_SECS="${2:-0}"
# Ensure COUNT is an integer
if ! [[ "$COUNT" =~ ^[0-9]+$ ]]; then
echo "COUNT must be an integer, got: $COUNT" >&2
exit 1
fi
for i in $(seq 1 "$COUNT"); do
echo "[$i/$COUNT] GET $URL"
curl -sS "$URL" > /dev/null || echo "Request $i failed"
# Sleep if non-zero (supports floats, no bc needed)
if [[ "$SLEEP_SECS" != "0" && "$SLEEP_SECS" != "0.0" && "$SLEEP_SECS" != "" ]]; then
sleep "$SLEEP_SECS"
fi
done