fix: harden UI actions and daemon calls for reliable control (v1.3.2)
Retry and serialize pineapd/hak5 calls, queue virtual-pager keys, and grey out buttons until the pager finishes. Deploy now installs python3-light after factory firmware. Bump version to 1.3.2. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Title: Mark VIII
|
||||
# Description: Mark VII-style web management UI for the WiFi Pineapple Pager
|
||||
# Author: c4ch3c4d3
|
||||
# Version: 1.3.1
|
||||
# Version: 1.3.2
|
||||
# Category: Remote-Access
|
||||
# Tags: remote-access, web-interface, device-management, pineap
|
||||
# Firmware: Pineapple Pager 24.10.1
|
||||
@@ -28,7 +28,7 @@ get_pager_ip() {
|
||||
}
|
||||
|
||||
LOG "cyan" "+---------------------------+"
|
||||
LOG "cyan" "| Mark VIII v1.3.1 |"
|
||||
LOG "cyan" "| Mark VIII v1.3.2 |"
|
||||
LOG "cyan" "+---------------------------+"
|
||||
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
@@ -70,8 +70,14 @@ wait_for_server_stop() {
|
||||
return 1
|
||||
}
|
||||
|
||||
release_pager_truth() {
|
||||
python3 "$SCRIPT_DIR/server.py" --release-pager >/tmp/pagerwebui-release.log 2>&1 || true
|
||||
}
|
||||
|
||||
remove_boot_service() {
|
||||
"$INIT_SCRIPT" stop 2>/dev/null || true
|
||||
wait_for_server_stop 90 || true
|
||||
release_pager_truth
|
||||
"$INIT_SCRIPT" disable 2>/dev/null || true
|
||||
rm -f "$INIT_SCRIPT"
|
||||
}
|
||||
@@ -84,7 +90,7 @@ if [ -f "$INIT_SCRIPT" ] && "$INIT_SCRIPT" running 2>/dev/null; then
|
||||
if user_confirmed "$resp"; then
|
||||
LOG "yellow" "Stopping service..."
|
||||
remove_boot_service
|
||||
if ! wait_for_server_stop 12; then
|
||||
if ! wait_for_server_stop 90; then
|
||||
LOG "red" "Service is still listening on port $PORT"
|
||||
exit 1
|
||||
fi
|
||||
@@ -147,8 +153,10 @@ LOG "cyan" "Starting foreground mode..."
|
||||
cleanup() {
|
||||
LOG "yellow" "Stopping Mark VIII..."
|
||||
[ -f "$PID_FILE" ] && kill "$(cat "$PID_FILE")" 2>/dev/null
|
||||
wait_for_server_stop 90 || true
|
||||
release_pager_truth
|
||||
rm -f "$PID_FILE"
|
||||
LOG "cyan" "Stopped."
|
||||
LOG "cyan" "Stopped. Pager UI is source of truth."
|
||||
}
|
||||
trap cleanup EXIT INT TERM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user