@@ -437,6 +437,48 @@ game-deploy GAME="" DRY="0":
437437 fi
438438 PROVISION_DRY_RUN=" {{ DRY }}" bash scripts/provision-server.sh " ${GAME} "
439439
440+ # ─── Fire-and-forget wizard ───────────────────────────────────────────────────
441+ # Complete end-to-end server provisioning including Steam auth and game download.
442+ # Set environment variables before running:
443+ # STEAM_USER, STEAM_PASS, GSA_STEAM_API_KEY (optional, for ID resolution)
444+ # WIZARD_TARGET_HOST (optional, for remote Verpex deployment)
445+
446+ # Interactive wizard — prompts for all values
447+ wizard GAME = " cryofall":
448+ bash scripts/ wizard.sh --game {{ GAME }}
449+
450+ # Unattended wizard — reads all values from environment
451+ wizard-auto GAME = " cryofall":
452+ WIZARD_GAME=" {{ GAME }} " bash scripts/ wizard.sh --game {{ GAME }} --unattended
453+
454+ # Stage game files from Steam onto the deployment host
455+ # Requires: STEAM_USER, STEAM_PASS
456+ cryofall-stage :
457+ bash scripts/ steam-stage.sh \
458+ - -app-id 1200170 \
459+ - -target-volume cryofall-game-data
460+
461+ # Stage game files to Verpex VPS (set WIZARD_TARGET_HOST or uses default)
462+ cryofall-stage-verpex :
463+ bash scripts/ steam-stage.sh \
464+ - -app-id 1200170 \
465+ - -target-volume cryofall-game-data \
466+ - -target-host root@209.42.26.106
467+
468+ # Resolve a Steam vanity URL to a Steam64 ID
469+ # Usage: just steam-resolve VANITY=hyperpolymath API_KEY=<your-key>
470+ steam-resolve VANITY = " " API_KEY = " ":
471+ #!/usr/bin/env bash
472+ set -euo pipefail
473+ VANITY=" {{ VANITY }}"
474+ KEY=" {{ API_KEY }}"
475+ [ -z " ${KEY} " ] && KEY=" ${GSA_STEAM_API_KEY:- } "
476+ if [ -z " ${VANITY} " ]; then
477+ echo " Usage: just steam-resolve VANITY=<username>"
478+ exit 1
479+ fi
480+ GSA_STEAM_API_KEY=" ${KEY} " src/interface/ffi/zig-out/bin/gsa steam resolve " ${VANITY} "
481+
440482# CryoFall shorthand — equivalent to: just game-deploy GAME=cryofall
441483cryofall-deploy :
442484 just game-deploy GAME=cryofall
@@ -473,6 +515,39 @@ cryofall-status:
473515 echo " Systemd service:"
474516 systemctl --user status gsa-cryofall --no-pager 2> /dev/null | head -8 || echo " Not installed"
475517
518+ # Start self-healing watchdog in the foreground
519+ cryofall-watchdog :
520+ bash scripts/ self-heal.sh --container cryofall --port 6000
521+
522+ # Install watchdog as a systemd user service (runs in background on Verpex)
523+ cryofall-watchdog-install :
524+ #!/usr/bin/env bash
525+ set -euo pipefail
526+ UNIT_FILE=" ${HOME} /.config/systemd/user/gsa-cryofall-watchdog.service"
527+ mkdir -p " $( dirname " ${UNIT_FILE} " ) "
528+ REPO=" $( pwd) "
529+ cat > " ${UNIT_FILE} " << UNIT
530+ [Unit]
531+ Description=GSA CryoFall self-heal watchdog
532+ After=gsa-cryofall.service
533+ Requires=gsa-cryofall.service
534+
535+ [Service]
536+ Type=simple
537+ ExecStart=/usr/bin/bash ${REPO} /scripts/self-heal.sh --container cryofall --port 6000
538+ Restart=always
539+ RestartSec=10s
540+ StandardOutput=journal
541+ StandardError=journal
542+
543+ [Install]
544+ WantedBy=default.target
545+ UNIT
546+ systemctl --user daemon-reload
547+ systemctl --user enable --now gsa-cryofall-watchdog
548+ echo "Watchdog service installed and started."
549+ systemctl --user status gsa-cryofall-watchdog --no-pager | head -6
550+
476551# Deploy to Verpex VPS via SSH (run this from local machine)
477552# Requires SSH key access: root@209.42.26.106
478553verpex-deploy GAME="cryofall":
0 commit comments