From ec2b584429f0a3ff19012b521f9df598862668c5 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 22 Jul 2026 18:30:26 -0600 Subject: [PATCH] install: create Controller venv during fresh install The Controller venv (/opt/wrolpi/controller/venv) was only ever created by upgrade.sh and reset_virtual_environments.sh, neither of which runs during a fresh install. install_raspberrypios.sh and install_debian_12.sh created only the main API venv, so on a clean machine wrolpi-controller crash-looped with 203/EXEC ("Unable to locate executable /opt/wrolpi/controller/venv/bin/python") because repair.sh unconditionally starts the service. Create the Controller venv inline right after the main venv, mirroring how the main venv is already built in these scripts. Verified on a fresh Raspberry Pi OS Trixie install (10.0.0.8): wrolpi-controller comes up active with 0 restarts. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/install_debian_12.sh | 4 ++++ scripts/install_raspberrypios.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/install_debian_12.sh b/scripts/install_debian_12.sh index cf59ede6..96824ba8 100755 --- a/scripts/install_debian_12.sh +++ b/scripts/install_debian_12.sh @@ -44,6 +44,10 @@ npm install || npm install || npm install || npm install # try install multiple python3 -m venv /opt/wrolpi/venv /opt/wrolpi/venv/bin/pip3 install --upgrade -r /opt/wrolpi/requirements.txt +# Create the Controller venv (kept separate from the main API venv). +python3 -m venv /opt/wrolpi/controller/venv +/opt/wrolpi/controller/venv/bin/pip3 install --upgrade -r /opt/wrolpi/controller/requirements.txt + # Create the WROLPi user grep wrolpi: /etc/passwd || useradd -md /home/wrolpi wrolpi -s "$(command -v bash)" diff --git a/scripts/install_raspberrypios.sh b/scripts/install_raspberrypios.sh index c43626d6..ee122ca4 100755 --- a/scripts/install_raspberrypios.sh +++ b/scripts/install_raspberrypios.sh @@ -44,6 +44,10 @@ npm install || npm install || npm install || npm install # try install multiple python3 -m venv /opt/wrolpi/venv /opt/wrolpi/venv/bin/pip3 install --upgrade -r /opt/wrolpi/requirements.txt +# Create the Controller venv (kept separate from the main API venv). +python3 -m venv /opt/wrolpi/controller/venv +/opt/wrolpi/controller/venv/bin/pip3 install --upgrade -r /opt/wrolpi/controller/requirements.txt + # Create the WROLPi user grep wrolpi: /etc/passwd || useradd -md /home/wrolpi wrolpi -s "$(command -v bash)"