Files
mapper/openspec/changes/mpvj-headless-setup-script/tasks.md
Timothy Hofland 7928a2be9b feat: add headless-setup-script and OpenSpec artifacts
Implement a 'one-liner' installation script for the MPVJ (Modern PocketVJ)
ecosystem on Raspbian x64 Lite.

- Interactive whiptail UI for Hostname, SSID, and WiFi Password configuration.
- Automated system hardening: hostapd, dnsmasq, avahi-daemon, and Node.js.
- Memory safety for Pi 3B: temporary 1GB swap and NPM concurrency limits.
- Networking failsafe: static AP on wlan0 and DHCP on eth0 with mDNS support.
- OpenSpec artifacts (Proposal, Design, Spec, Tasks) included.
2026-03-10 22:23:58 +01:00

34 lines
1.4 KiB
Markdown

## 1. Interrogation & Validation
- [x] 1.1 Implement argument check for `<REPO_URL>`.
- [x] 1.2 Create `whiptail` prompts for Hostname, SSID, WiFi Password, and Country Code.
- [x] 1.3 Add validation loop for WPA2 password length (min 8 chars) and Country Code format.
## 2. System Staging
- [x] 2.1 Implement the Pre-Flight Disk Space check (`df -h`).
- [x] 2.2 Implement the progress bar for `apt update && upgrade`.
- [x] 2.3 Install dependencies: `nodejs`, `hostapd`, `dnsmasq`, `avahi-daemon`, `git`.
- [x] 2.4 Configure Hostname and WiFi Country Code in system files.
- [x] 2.5 Set up the temporary 1GB Swap file.
## 3. Networking Configuration
- [x] 3.1 Write the `hostapd.conf` template using user-provided SSID and Password.
- [x] 3.2 Configure `dnsmasq.conf` for the `192.168.4.1` range.
- [x] 3.3 Update `dhcpcd.conf` to set static IP on `wlan0`.
- [x] 3.4 Create Avahi service file for mDNS HTTP discovery (including Link-Local support).
## 4. Application Deployment
- [x] 4.1 Clone the repository to `/home/pi/mpvj`.
- [x] 4.2 Run `npm install` with concurrency limits (`--jobs 1`) and `npm run build` within the swap safety net.
- [x] 4.3 Install the `systemd` service for the backend.
- [x] 4.4 Generate the `.env` file with installation metadata.
## 5. Finalization
- [x] 5.1 Revert the swap file to default size.
- [x] 5.2 Implement the "Ultimate Summary" whiptail message box.
- [x] 5.3 Add the final reboot confirmation dialog.