Banner tweak (manual)
This commit is contained in:
13
WEB_UI.md
13
WEB_UI.md
@@ -135,6 +135,19 @@ On first run with HTTPS enabled:
|
|||||||
|
|
||||||
**Note:** Browsers will show a security warning for self-signed certificates. This is expected for home network use.
|
**Note:** Browsers will show a security warning for self-signed certificates. This is expected for home network use.
|
||||||
|
|
||||||
|
**Tip:** To avoid browser warnings, use [mkcert](https://github.com/FiloSottile/mkcert) to generate locally-trusted certificates:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install mkcert and create local CA (one-time)
|
||||||
|
mkcert -install
|
||||||
|
|
||||||
|
# Generate trusted certs for your Pi
|
||||||
|
mkcert -key-file key.pem -cert-file cert.pem stegasoo.local localhost 127.0.0.1 YOUR_PI_IP
|
||||||
|
|
||||||
|
# Copy to certs directory
|
||||||
|
mv key.pem cert.pem frontends/web/certs/
|
||||||
|
```
|
||||||
|
|
||||||
### Disabling Authentication
|
### Disabling Authentication
|
||||||
|
|
||||||
For development or trusted networks:
|
For development or trusted networks:
|
||||||
|
|||||||
BIN
data/WebUI_About.webp
Normal file
BIN
data/WebUI_About.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
BIN
data/WebUI_Account.webp
Normal file
BIN
data/WebUI_Account.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
data/WebUI_Login.webp
Normal file
BIN
data/WebUI_Login.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
BIN
data/WebUI_Setup.webp
Normal file
BIN
data/WebUI_Setup.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -185,7 +185,7 @@ STEGASOO_USER=$(stat -c '%U' "$INSTALL_DIR" 2>/dev/null || echo "pi")
|
|||||||
|
|
||||||
echo " Updating systemd service..."
|
echo " Updating systemd service..."
|
||||||
|
|
||||||
sudo tee /etc/systemd/system/stegasoo.service > /dev/null <<EOF
|
sudo tee /etc/systemd/system/stegasoo.service >/dev/null <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Stegasoo Web UI
|
Description=Stegasoo Web UI
|
||||||
After=network.target
|
After=network.target
|
||||||
@@ -214,8 +214,8 @@ if [ "$USE_PORT_443" = "true" ]; then
|
|||||||
echo " Setting up port 443 redirect..."
|
echo " Setting up port 443 redirect..."
|
||||||
|
|
||||||
# Install iptables if needed
|
# Install iptables if needed
|
||||||
if ! command -v iptables &> /dev/null; then
|
if ! command -v iptables &>/dev/null; then
|
||||||
sudo apt-get install -y iptables > /dev/null 2>&1
|
sudo apt-get install -y iptables >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add redirect rule (check if it already exists)
|
# Add redirect rule (check if it already exists)
|
||||||
@@ -225,7 +225,7 @@ if [ "$USE_PORT_443" = "true" ]; then
|
|||||||
sudo sh -c 'iptables-save > /etc/iptables.rules'
|
sudo sh -c 'iptables-save > /etc/iptables.rules'
|
||||||
|
|
||||||
# Create/update persistence service
|
# Create/update persistence service
|
||||||
sudo tee /etc/systemd/system/iptables-restore.service > /dev/null <<EOF
|
sudo tee /etc/systemd/system/iptables-restore.service >/dev/null <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Restore iptables rules
|
Description=Restore iptables rules
|
||||||
Before=network-pre.target
|
Before=network-pre.target
|
||||||
@@ -237,7 +237,7 @@ ExecStart=/sbin/iptables-restore /etc/iptables.rules
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
sudo systemctl enable iptables-restore.service > /dev/null 2>&1
|
sudo systemctl enable iptables-restore.service >/dev/null 2>&1
|
||||||
echo -e " ${GREEN}✓${NC} Port 443 redirect configured"
|
echo -e " ${GREEN}✓${NC} Port 443 redirect configured"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ PI_IP=$(hostname -I | awk '{print $1}')
|
|||||||
HOSTNAME=$(hostname)
|
HOSTNAME=$(hostname)
|
||||||
|
|
||||||
echo -e "${GREEN}"
|
echo -e "${GREEN}"
|
||||||
cat << 'BANNER'
|
cat <<'BANNER'
|
||||||
_____ _
|
_____ _
|
||||||
/ ____| |
|
/ ____| |
|
||||||
| (___ | |_ ___ __ _ __ _ ___ ___ ___
|
| (___ | |_ ___ __ _ __ _ ___ ___ ___
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
# Pull Stegasoo image from SD card
|
# Pull Stegasoo image from SD card
|
||||||
# Auto-detects SD card, copies with progress, shrinks, and compresses
|
# Auto-detects SD card, copies with progress, shrinks, and compresses
|
||||||
#
|
#
|
||||||
# Usage: ./pull-image.sh [output-name]
|
# Usage: ./pull-image.sh [output-name] [device]
|
||||||
# Output will be: stegasoo-rpi-YYYYMMDD.img.zst (or custom name)
|
# Output will be: stegasoo-rpi-YYYYMMDD.img.zst (or custom name)
|
||||||
#
|
#
|
||||||
|
# If device is specified, skips auto-detection (useful for large drives)
|
||||||
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -30,12 +32,13 @@ if [ "$EUID" -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Output filename
|
# Output filename and optional device
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
OUTPUT="$1"
|
OUTPUT="$1"
|
||||||
else
|
else
|
||||||
OUTPUT="stegasoo-rpi-$(date +%Y%m%d).img.zst"
|
OUTPUT="stegasoo-rpi-$(date +%Y%m%d).img.zst"
|
||||||
fi
|
fi
|
||||||
|
MANUAL_DEVICE="$2"
|
||||||
|
|
||||||
# Remove .zst extension for intermediate file
|
# Remove .zst extension for intermediate file
|
||||||
IMG_FILE="${OUTPUT%.zst}"
|
IMG_FILE="${OUTPUT%.zst}"
|
||||||
@@ -50,15 +53,28 @@ echo "║ Stegasoo SD Card Image Puller ║"
|
|||||||
echo "╚═══════════════════════════════════════════════════════════════╝"
|
echo "╚═══════════════════════════════════════════════════════════════╝"
|
||||||
echo -e "${NC}"
|
echo -e "${NC}"
|
||||||
|
|
||||||
# Auto-detect SD card candidates
|
# Use manual device or auto-detect
|
||||||
# Looking for: USB/removable, 8-128GB, not mounted as root filesystem
|
if [ -n "$MANUAL_DEVICE" ]; then
|
||||||
echo -e "${BOLD}Scanning for SD cards...${NC}"
|
# Manual device specified
|
||||||
echo ""
|
if [ ! -b "$MANUAL_DEVICE" ]; then
|
||||||
|
echo -e "${RED}Error: $MANUAL_DEVICE is not a block device${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SELECTED="$MANUAL_DEVICE"
|
||||||
|
echo -e "Using specified device: ${YELLOW}$SELECTED${NC}"
|
||||||
|
echo ""
|
||||||
|
lsblk "$SELECTED" -o NAME,SIZE,TYPE,MODEL
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
# Auto-detect SD card candidates
|
||||||
|
# Looking for: USB/removable, 8-128GB, not mounted as root filesystem
|
||||||
|
echo -e "${BOLD}Scanning for SD cards...${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
declare -a CANDIDATES
|
declare -a CANDIDATES
|
||||||
declare -a CANDIDATE_INFO
|
declare -a CANDIDATE_INFO
|
||||||
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
DEV=$(echo "$line" | awk '{print $1}')
|
DEV=$(echo "$line" | awk '{print $1}')
|
||||||
SIZE=$(echo "$line" | awk '{print $2}')
|
SIZE=$(echo "$line" | awk '{print $2}')
|
||||||
TYPE=$(echo "$line" | awk '{print $3}')
|
TYPE=$(echo "$line" | awk '{print $3}')
|
||||||
@@ -85,36 +101,39 @@ while IFS= read -r line; do
|
|||||||
CANDIDATES+=("/dev/$DEV")
|
CANDIDATES+=("/dev/$DEV")
|
||||||
CANDIDATE_INFO+=("$SIZE $TYPE ${TRAN:-???} $MODEL")
|
CANDIDATE_INFO+=("$SIZE $TYPE ${TRAN:-???} $MODEL")
|
||||||
fi
|
fi
|
||||||
done < <(lsblk -d -o NAME,SIZE,TYPE,TRAN,MODEL -n | grep "disk")
|
done < <(lsblk -d -o NAME,SIZE,TYPE,TRAN,MODEL -n | grep "disk")
|
||||||
|
|
||||||
if [ ${#CANDIDATES[@]} -eq 0 ]; then
|
if [ ${#CANDIDATES[@]} -eq 0 ]; then
|
||||||
echo -e "${RED}No SD card candidates found.${NC}"
|
echo -e "${RED}No SD card candidates found.${NC}"
|
||||||
echo "Looking for USB/removable disks between 8GB and 128GB."
|
echo "Looking for USB/removable disks between 8GB and 128GB."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Available disks:"
|
echo "Available disks:"
|
||||||
lsblk -d -o NAME,SIZE,TYPE,TRAN,MODEL
|
lsblk -d -o NAME,SIZE,TYPE,TRAN,MODEL
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}Tip: Specify device manually: $0 output.img.zst /dev/sdX${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}Found ${#CANDIDATES[@]} candidate(s):${NC}"
|
echo -e "${GREEN}Found ${#CANDIDATES[@]} candidate(s):${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
for i in "${!CANDIDATES[@]}"; do
|
for i in "${!CANDIDATES[@]}"; do
|
||||||
echo -e " ${BOLD}[$((i+1))]${NC} ${CANDIDATES[$i]} - ${CANDIDATE_INFO[$i]}"
|
echo -e " ${BOLD}[$((i+1))]${NC} ${CANDIDATES[$i]} - ${CANDIDATE_INFO[$i]}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ ${#CANDIDATES[@]} -eq 1 ]; then
|
if [ ${#CANDIDATES[@]} -eq 1 ]; then
|
||||||
SELECTED="${CANDIDATES[0]}"
|
SELECTED="${CANDIDATES[0]}"
|
||||||
echo -e "Auto-selected: ${YELLOW}$SELECTED${NC}"
|
echo -e "Auto-selected: ${YELLOW}$SELECTED${NC}"
|
||||||
else
|
else
|
||||||
read -p "Select device [1-${#CANDIDATES[@]}]: " -r
|
read -p "Select device [1-${#CANDIDATES[@]}]: " -r
|
||||||
if [[ ! $REPLY =~ ^[0-9]+$ ]] || [ "$REPLY" -lt 1 ] || [ "$REPLY" -gt ${#CANDIDATES[@]} ]; then
|
if [[ ! $REPLY =~ ^[0-9]+$ ]] || [ "$REPLY" -lt 1 ] || [ "$REPLY" -gt ${#CANDIDATES[@]} ]; then
|
||||||
echo -e "${RED}Invalid selection.${NC}"
|
echo -e "${RED}Invalid selection.${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
SELECTED="${CANDIDATES[$((REPLY-1))]}"
|
SELECTED="${CANDIDATES[$((REPLY-1))]}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show partitions
|
# Show partitions
|
||||||
|
|||||||
BIN
test_data/rpi_20260102.jpg
Normal file
BIN
test_data/rpi_20260102.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 236 KiB |
Reference in New Issue
Block a user