From a8db991052b8bb7af75dd116844e1b2395f8195e Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Sun, 4 Jan 2026 16:57:02 -0500 Subject: [PATCH] Add stegasoo CLI and rpi scripts to PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creates /etc/profile.d/stegasoo-path.sh to add: - /opt/stegasoo/venv/bin (stegasoo CLI) - /opt/stegasoo/rpi (setup.sh, sanitize-for-image.sh, etc) Users can now run 'stegasoo' and the rpi scripts from anywhere. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- rpi/setup.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/rpi/setup.sh b/rpi/setup.sh index f4aecf8..766c9d8 100755 --- a/rpi/setup.sh +++ b/rpi/setup.sh @@ -117,7 +117,7 @@ if [ "$TOTAL_MEM" -lt 2000 ]; then fi # Create /opt/stegasoo with proper permissions -echo -e "${GREEN}[1/7]${NC} Setting up install directory..." +echo -e "${GREEN}[1/8]${NC} Setting up install directory..." if [ ! -d "$INSTALL_DIR" ]; then sudo mkdir -p "$INSTALL_DIR" sudo chown "$USER:$USER" "$INSTALL_DIR" @@ -128,7 +128,7 @@ else echo " $INSTALL_DIR exists, updated ownership" fi -echo -e "${GREEN}[2/7]${NC} Installing system dependencies..." +echo -e "${GREEN}[2/8]${NC} Installing system dependencies..." sudo apt-get update sudo apt-get install -y \ build-essential \ @@ -149,7 +149,7 @@ sudo apt-get install -y \ libzbar0 \ libjpeg-dev -echo -e "${GREEN}[3/7]${NC} Installing pyenv and Python $PYTHON_VERSION..." +echo -e "${GREEN}[3/8]${NC} Installing pyenv and Python $PYTHON_VERSION..." # Install pyenv if not present if [ ! -d "$HOME/.pyenv" ]; then @@ -189,7 +189,7 @@ if [ "$INSTALLED_PY" != "$PYTHON_VERSION" ]; then exit 1 fi -echo -e "${GREEN}[4/7]${NC} Building jpegio for ARM..." +echo -e "${GREEN}[4/8]${NC} Building jpegio for ARM..." # Clone jpegio JPEGIO_DIR="/tmp/jpegio-build" @@ -216,7 +216,7 @@ pip install . cd "$HOME" rm -rf "$JPEGIO_DIR" -echo -e "${GREEN}[5/7]${NC} Installing Stegasoo..." +echo -e "${GREEN}[5/8]${NC} Installing Stegasoo..." # Clone Stegasoo if [ -d "$INSTALL_DIR/.git" ]; then @@ -244,7 +244,7 @@ pip install -e ".[web]" || { pip install argon2-cffi cryptography pillow flask gunicorn scipy numpy pyzbar qrcode } -echo -e "${GREEN}[6/7]${NC} Creating systemd service..." +echo -e "${GREEN}[6/8]${NC} Creating systemd service..." # Create systemd service file sudo tee /etc/systemd/system/stegasoo.service > /dev/null < /dev/null <<'PATHEOF' +# Stegasoo CLI and scripts +if [ -d /opt/stegasoo/venv/bin ]; then + export PATH="/opt/stegasoo/venv/bin:$PATH" +fi +if [ -d /opt/stegasoo/rpi ]; then + export PATH="/opt/stegasoo/rpi:$PATH" +fi +PATHEOF +sudo chmod 644 /etc/profile.d/stegasoo-path.sh +echo " Added /opt/stegasoo/venv/bin and /opt/stegasoo/rpi to PATH" + echo "" echo -e "${BOLD}Installation Complete!${NC}" echo -e "${BLUE}-------------------------------------------------------${NC}"