Adding restart watchdog and moving to i0t.app

This commit is contained in:
2026-04-26 13:47:47 -06:00
parent 38893cbb84
commit 212e957f49
13 changed files with 279 additions and 15 deletions

View File

@@ -449,6 +449,33 @@ else
ok "Service enabled and started"
fi
# ── 9. Watchdog ────────────────────────────────────────────────────────────────
nl
step "Installing watchdog (USB unplug/replug recovery)..."
if $IS_MAC; then
WATCHDOG_BIN="${BIN_DIR}/streamdeck-go-watchdog"
WATCHDOG_PLIST_LABEL="com.woodarddigital.streamdeck-go-watchdog"
WATCHDOG_PLIST="${LAUNCHAGENTS_DIR}/${WATCHDOG_PLIST_LABEL}.plist"
WATCHDOG_LOG="${HOME}/Library/Logs/streamdeck-go-watchdog.log"
install -m 755 systemd/streamdeck-go-watchdog.sh "${WATCHDOG_BIN}"
sed \
-e "s|STREAMDECK_WATCHDOG_PATH|${WATCHDOG_BIN}|g" \
-e "s|STREAMDECK_WATCHDOG_LOG_PATH|${WATCHDOG_LOG}|g" \
launchd/com.woodarddigital.streamdeck-go-watchdog.plist \
> "${WATCHDOG_PLIST}"
launchctl bootout "gui/$(id -u)/${WATCHDOG_PLIST_LABEL}" 2>/dev/null || true
launchctl bootstrap "gui/$(id -u)" "${WATCHDOG_PLIST}"
ok "Watchdog loaded — fires every 30s"
else
install_file 755 systemd/streamdeck-go-watchdog.sh "${BIN_DIR}/streamdeck-go-watchdog"
install_file 644 systemd/streamdeck-go-watchdog.service "${SYSTEMD_USER}/streamdeck-go-watchdog.service"
install_file 644 systemd/streamdeck-go-watchdog.timer "${SYSTEMD_USER}/streamdeck-go-watchdog.timer"
systemctl --user daemon-reload
systemctl --user enable --now streamdeck-go-watchdog.timer
ok "Watchdog timer enabled — fires every 30s"
fi
# ── Done ───────────────────────────────────────────────────────────────────────
nl
echo -e " ${DIM}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"