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

1.4 KiB

1. Interrogation & Validation

  • 1.1 Implement argument check for <REPO_URL>.
  • 1.2 Create whiptail prompts for Hostname, SSID, WiFi Password, and Country Code.
  • 1.3 Add validation loop for WPA2 password length (min 8 chars) and Country Code format.

2. System Staging

  • 2.1 Implement the Pre-Flight Disk Space check (df -h).
  • 2.2 Implement the progress bar for apt update && upgrade.
  • 2.3 Install dependencies: nodejs, hostapd, dnsmasq, avahi-daemon, git.
  • 2.4 Configure Hostname and WiFi Country Code in system files.
  • 2.5 Set up the temporary 1GB Swap file.

3. Networking Configuration

  • 3.1 Write the hostapd.conf template using user-provided SSID and Password.
  • 3.2 Configure dnsmasq.conf for the 192.168.4.1 range.
  • 3.3 Update dhcpcd.conf to set static IP on wlan0.
  • 3.4 Create Avahi service file for mDNS HTTP discovery (including Link-Local support).

4. Application Deployment

  • 4.1 Clone the repository to /home/pi/mpvj.
  • 4.2 Run npm install with concurrency limits (--jobs 1) and npm run build within the swap safety net.
  • 4.3 Install the systemd service for the backend.
  • 4.4 Generate the .env file with installation metadata.

5. Finalization

  • 5.1 Revert the swap file to default size.
  • 5.2 Implement the "Ultimate Summary" whiptail message box.
  • 5.3 Add the final reboot confirmation dialog.