Fix Pi setup: use /opt/stegasoo, flexible Python version

- Change .python-version from 3.12.0 to 3.12 (matches any 3.12.x)
- Update docs to use /opt/stegasoo instead of ~/stegasoo
- Add pre-setup steps: chown /opt, install git
- Renumber BUILD_IMAGE.md steps (now 9 steps)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Aaron D. Lee
2026-01-05 13:16:31 -05:00
parent e4cf96bb7c
commit a3ff8dace1
3 changed files with 46 additions and 34 deletions

View File

@@ -1 +1 @@
3.12.0 3.12

View File

@@ -20,13 +20,22 @@ ssh admin@stegasoo.local
# or use IP from router DHCP list # or use IP from router DHCP list
``` ```
## Step 3: Run Setup Script ## Step 3: Pre-Setup
```bash ```bash
# Download and run (avoid curl|bash stdin issues) # Take ownership of /opt (for pyenv, jpegio builds)
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh sudo chown admin:admin /opt
chmod +x setup.sh
./setup.sh # Install git (not included in Lite image)
sudo apt-get update && sudo apt-get install -y git
```
## Step 4: Clone & Run Setup
```bash
git clone -b 4.1 https://github.com/adlee-was-taken/stegasoo.git
cd stegasoo
./rpi/setup.sh
``` ```
This takes ~15-20 minutes and installs: This takes ~15-20 minutes and installs:
@@ -35,7 +44,7 @@ This takes ~15-20 minutes and installs:
- Stegasoo with web UI - Stegasoo with web UI
- Systemd service - Systemd service
## Step 4: Test It Works ## Step 5: Test It Works
```bash ```bash
sudo systemctl start stegasoo sudo systemctl start stegasoo
@@ -43,14 +52,14 @@ curl -k https://localhost:5000
# Should return HTML # Should return HTML
``` ```
## Step 5: Sanitize for Distribution ## Step 6: Sanitize for Distribution
```bash ```bash
# Full sanitize (for final image - removes WiFi, shuts down) # Full sanitize (for final image - removes WiFi, shuts down)
sudo ~/stegasoo/rpi/sanitize-for-image.sh sudo /opt/stegasoo/rpi/sanitize-for-image.sh
# Or soft reset (for testing - keeps WiFi, reboots) # Or soft reset (for testing - keeps WiFi, reboots)
sudo ~/stegasoo/rpi/sanitize-for-image.sh --soft sudo /opt/stegasoo/rpi/sanitize-for-image.sh --soft
``` ```
This removes: This removes:
@@ -63,7 +72,7 @@ This removes:
The script validates all cleanup steps before finishing. The script validates all cleanup steps before finishing.
## Step 6: Copy the Image ## Step 7: Copy the Image
Remove SD card, insert into your Linux machine: Remove SD card, insert into your Linux machine:
@@ -75,7 +84,7 @@ lsblk
sudo dd if=/dev/sdX of=stegasoo-rpi-$(date +%Y%m%d).img bs=4M status=progress sudo dd if=/dev/sdX of=stegasoo-rpi-$(date +%Y%m%d).img bs=4M status=progress
``` ```
## Step 7: Shrink & Compress ## Step 8: Shrink & Compress
```bash ```bash
# Optional: Shrink image (saves space) # Optional: Shrink image (saves space)
@@ -87,7 +96,7 @@ sudo ./pishrink.sh stegasoo-rpi-*.img
zstd -19 -T0 stegasoo-rpi-*.img zstd -19 -T0 stegasoo-rpi-*.img
``` ```
## Step 8: Distribute ## Step 9: Distribute
Upload `.img.zst` to GitHub Releases. Upload `.img.zst` to GitHub Releases.
@@ -104,11 +113,14 @@ zstdcat stegasoo-rpi-*.img.zst | sudo dd of=/dev/sdX bs=4M status=progress
## Quick Command Summary ## Quick Command Summary
```bash ```bash
# On Pi: # On Pi (after SSH):
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh && chmod +x setup.sh && ./setup.sh sudo chown admin:admin /opt
sudo apt-get update && sudo apt-get install -y git
git clone -b 4.1 https://github.com/adlee-was-taken/stegasoo.git
cd stegasoo && ./rpi/setup.sh
sudo systemctl start stegasoo sudo systemctl start stegasoo
curl -k https://localhost:5000 curl -k https://localhost:5000
sudo ~/stegasoo/rpi/sanitize-for-image.sh sudo /opt/stegasoo/rpi/sanitize-for-image.sh
# On your machine: # On your machine:
sudo dd if=/dev/sdX of=stegasoo-rpi-$(date +%Y%m%d).img bs=4M status=progress sudo dd if=/dev/sdX of=stegasoo-rpi-$(date +%Y%m%d).img bs=4M status=progress

View File

@@ -7,18 +7,14 @@ Scripts and resources for deploying Stegasoo on Raspberry Pi.
On a fresh Raspberry Pi OS Lite (64-bit) installation: On a fresh Raspberry Pi OS Lite (64-bit) installation:
```bash ```bash
# Download and run (recommended) # Pre-setup (git not included in Lite image)
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh sudo chown $USER:$USER /opt
chmod +x setup.sh sudo apt-get update && sudo apt-get install -y git
./setup.sh
```
Or clone the repo: # Clone and run setup
git clone -b 4.1 https://github.com/adlee-was-taken/stegasoo.git /opt/stegasoo
```bash cd /opt/stegasoo
git clone -b 4.1 https://github.com/adlee-was-taken/stegasoo.git ./rpi/setup.sh
cd stegasoo/rpi
./setup.sh
``` ```
## What the Setup Script Does ## What the Setup Script Does
@@ -104,7 +100,7 @@ sudo systemctl restart stegasoo
sudo systemctl stop stegasoo sudo systemctl stop stegasoo
sudo systemctl disable stegasoo sudo systemctl disable stegasoo
sudo rm /etc/systemd/system/stegasoo.service sudo rm /etc/systemd/system/stegasoo.service
rm -rf ~/stegasoo rm -rf /opt/stegasoo
``` ```
## Pre-built Images ## Pre-built Images
@@ -133,10 +129,14 @@ In advanced settings, set:
# SSH into the Pi # SSH into the Pi
ssh admin@stegasoo.local ssh admin@stegasoo.local
# Download and run setup script # Pre-setup
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh sudo chown admin:admin /opt
chmod +x setup.sh sudo apt-get update && sudo apt-get install -y git
./setup.sh
# Clone and run setup
git clone -b 4.1 https://github.com/adlee-was-taken/stegasoo.git /opt/stegasoo
cd /opt/stegasoo
./rpi/setup.sh
``` ```
### 3. Test It Works ### 3. Test It Works
@@ -150,10 +150,10 @@ curl -k https://localhost:5000 # Should return HTML
```bash ```bash
# Full sanitize (removes WiFi, shuts down for imaging) # Full sanitize (removes WiFi, shuts down for imaging)
sudo ~/stegasoo/rpi/sanitize-for-image.sh sudo /opt/stegasoo/rpi/sanitize-for-image.sh
# Or soft reset (keeps WiFi for testing, reboots) # Or soft reset (keeps WiFi for testing, reboots)
sudo ~/stegasoo/rpi/sanitize-for-image.sh --soft sudo /opt/stegasoo/rpi/sanitize-for-image.sh --soft
``` ```
This removes: This removes: