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.
1.4 KiB
1.4 KiB
1. Interrogation & Validation
- 1.1 Implement argument check for
<REPO_URL>. - 1.2 Create
whiptailprompts 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.conftemplate using user-provided SSID and Password. - 3.2 Configure
dnsmasq.conffor the192.168.4.1range. - 3.3 Update
dhcpcd.confto set static IP onwlan0. - 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 installwith concurrency limits (--jobs 1) andnpm run buildwithin the swap safety net. - 4.3 Install the
systemdservice for the backend. - 4.4 Generate the
.envfile 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.