Commit Graph

9 Commits

Author SHA1 Message Date
Claude
f89bbecdcd Fix script crash: remove set -u, handle python exit safely
- set -euo → set -eo (unset var no longer fatal)
- Python snapshot lookup: catch exceptions, use || true
- Prevents script exit on empty PBS responses

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 00:27:23 +00:00
Claude
394a0b0a7c Fix: empty Enter on VM selection crashes due to set -u (unset variable)
Added || true on read and ${:-} default expansion to handle empty input safely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 00:23:07 +00:00
Claude
f0900204fb Auto-default storage to local-lvm in non-interactive VM restore mode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 15:47:52 +00:00
Claude
8d76dc8da2 Add --vm-id, --vm-vmid, --vm-storage for fully non-interactive PBS restore
Auto-selects VM backup, target VMID, storage, and auto-confirms existing VM deletion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 15:44:35 +00:00
Claude
a0e94682bf Add --skip-pbs flag for non-interactive PBS phase
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 15:42:31 +00:00
Claude
6834612deb Add CLI args support: --name, --hira, --addr, --owner, --phone, --mssql
Allows non-interactive execution via SSH pipe or automation.
Falls back to interactive /dev/tty input when no args provided.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 15:40:53 +00:00
Claude
d08ff19470 Improve LAN detection: check Headscale port response, not just ping
Ping 192.168.0.100 can false-positive if external pharmacy has a device
at that IP. Now checks if 192.168.0.100:8070 actually responds like Headscale.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:48:21 +00:00
Claude
985ec18651 Fix Headscale connection: auto-detect LAN vs external network
Same-LAN PVE hosts can't reach head.pharmq.kr via public IP (NAT hairpinning).
Script now pings 192.168.0.100 to detect LAN and uses direct IP:8070 instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:45:58 +00:00
Claude
d0cd2b1137 Add unified PharmQ PVE setup script + design doc
Single script that handles: PVE repo fix, Tailscale/Headscale VPN registration,
PBS Windows VM restore, Ubuntu CT creation with API environment,
pharmacy + device registration in farmq.db, and gateway account creation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:31:05 +00:00