- Phase 4: VM이 이미 존재하면 PBS 복원 스킵 (qm status 체크)
- Phase 5: ubuntu-api CT가 이미 있으면 생성 스킵 (200~299 스캔)
- Phase 6: CT에 Tailscale + API 코드가 있으면 환경 구축 스킵
- PBS 인증 실패 시 exit 대신 스킵 후 계속 진행
- 상태 파일 없이 시스템 상태만 보고 판단
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Users were entering list number (e.g. 4) but script expected backup ID (e.g. 201).
Now maps selection number to actual VM ID via temp file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VM restore failure should not kill the entire script.
Skip to Phase 5 (CT creation) instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 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>
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>
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>
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>
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>
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>