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

@@ -20,13 +20,22 @@ ssh admin@stegasoo.local
# or use IP from router DHCP list
```
## Step 3: Run Setup Script
## Step 3: Pre-Setup
```bash
# Download and run (avoid curl|bash stdin issues)
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh
chmod +x setup.sh
./setup.sh
# Take ownership of /opt (for pyenv, jpegio builds)
sudo chown admin:admin /opt
# 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:
@@ -35,7 +44,7 @@ This takes ~15-20 minutes and installs:
- Stegasoo with web UI
- Systemd service
## Step 4: Test It Works
## Step 5: Test It Works
```bash
sudo systemctl start stegasoo
@@ -43,14 +52,14 @@ curl -k https://localhost:5000
# Should return HTML
```
## Step 5: Sanitize for Distribution
## Step 6: Sanitize for Distribution
```bash
# 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)
sudo ~/stegasoo/rpi/sanitize-for-image.sh --soft
sudo /opt/stegasoo/rpi/sanitize-for-image.sh --soft
```
This removes:
@@ -63,7 +72,7 @@ This removes:
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:
@@ -75,7 +84,7 @@ lsblk
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
# Optional: Shrink image (saves space)
@@ -87,7 +96,7 @@ sudo ./pishrink.sh stegasoo-rpi-*.img
zstd -19 -T0 stegasoo-rpi-*.img
```
## Step 8: Distribute
## Step 9: Distribute
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
```bash
# On Pi:
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh && chmod +x setup.sh && ./setup.sh
# On Pi (after SSH):
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
curl -k https://localhost:5000
sudo ~/stegasoo/rpi/sanitize-for-image.sh
sudo /opt/stegasoo/rpi/sanitize-for-image.sh
# On your machine:
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:
```bash
# Download and run (recommended)
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh
chmod +x setup.sh
./setup.sh
```
# Pre-setup (git not included in Lite image)
sudo chown $USER:$USER /opt
sudo apt-get update && sudo apt-get install -y git
Or clone the repo:
```bash
git clone -b 4.1 https://github.com/adlee-was-taken/stegasoo.git
cd stegasoo/rpi
./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
```
## What the Setup Script Does
@@ -104,7 +100,7 @@ sudo systemctl restart stegasoo
sudo systemctl stop stegasoo
sudo systemctl disable stegasoo
sudo rm /etc/systemd/system/stegasoo.service
rm -rf ~/stegasoo
rm -rf /opt/stegasoo
```
## Pre-built Images
@@ -133,10 +129,14 @@ In advanced settings, set:
# SSH into the Pi
ssh admin@stegasoo.local
# Download and run setup script
wget -O setup.sh https://raw.githubusercontent.com/adlee-was-taken/stegasoo/4.1/rpi/setup.sh
chmod +x setup.sh
./setup.sh
# Pre-setup
sudo chown admin:admin /opt
sudo apt-get update && sudo apt-get install -y git
# 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
@@ -150,10 +150,10 @@ curl -k https://localhost:5000 # Should return HTML
```bash
# 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)
sudo ~/stegasoo/rpi/sanitize-for-image.sh --soft
sudo /opt/stegasoo/rpi/sanitize-for-image.sh --soft
```
This removes: