fix(nzbhydra): Fix startup script for generic release
- Install python3 for wrapper script - Use nzbhydra2wrapperPy3.py instead of native binary - Download generic release (not linux-specific) - Handle already-installed case Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
169b39ed57
commit
d308b22070
@ -5109,3 +5109,18 @@ git checkout HEAD -- index.html
|
|||||||
- `/usr/sbin/dropletctl` (new)
|
- `/usr/sbin/dropletctl` (new)
|
||||||
- `/usr/libexec/rpcd/luci.droplet` (new)
|
- `/usr/libexec/rpcd/luci.droplet` (new)
|
||||||
- `/www/luci-static/resources/view/droplet/overview.js` (new)
|
- `/www/luci-static/resources/view/droplet/overview.js` (new)
|
||||||
|
|
||||||
|
108. **Newsbin - Usenet Search & Download (2026-03-14)**
|
||||||
|
- SABnzbd LXC container using Debian rootfs (no Docker/Podman)
|
||||||
|
- Downloads Debian LXC rootfs from images.linuxcontainers.org
|
||||||
|
- Installs sabnzbdplus, unrar, par2, p7zip inside container
|
||||||
|
- Container IP: 192.168.255.40:8085
|
||||||
|
- NZBHydra2 package prepared (192.168.255.41:5076)
|
||||||
|
- LuCI dashboard at Services > Newsbin
|
||||||
|
- NNTP credentials: EWEKA account configured in UCI
|
||||||
|
- RPCD backend with status/queue/history/search methods
|
||||||
|
- Fixed BusyBox sh compatibility (local vars, json_add_boolean)
|
||||||
|
- **Files**:
|
||||||
|
- `secubox-app-sabnzbd/`: Makefile, UCI config, init.d, sabnzbdctl
|
||||||
|
- `secubox-app-nzbhydra/`: Makefile, UCI config, init.d, nzbhydractl
|
||||||
|
- `luci-app-newsbin/`: overview.js, RPCD handler, ACL, menu
|
||||||
|
|||||||
@ -72,39 +72,48 @@ exec > /config/startup.log 2>&1
|
|||||||
echo "=== Starting NZBHydra2 $(date) ==="
|
echo "=== Starting NZBHydra2 $(date) ==="
|
||||||
|
|
||||||
# Install NZBHydra2 if not present
|
# Install NZBHydra2 if not present
|
||||||
if [ ! -f "/opt/nzbhydra2/nzbhydra2" ]; then
|
if [ ! -f "/opt/nzbhydra2/lib/core.jar" ] && ! ls /opt/nzbhydra2/lib/core-*-exec.jar >/dev/null 2>&1; then
|
||||||
echo "Installing NZBHydra2..."
|
echo "Installing NZBHydra2..."
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
openjdk-17-jre-headless \
|
openjdk-17-jre-headless \
|
||||||
|
python3 \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
unzip
|
unzip || { echo "apt install failed"; exit 1; }
|
||||||
|
|
||||||
# Download NZBHydra2
|
# Download NZBHydra2
|
||||||
mkdir -p /opt/nzbhydra2
|
mkdir -p /opt/nzbhydra2
|
||||||
cd /opt/nzbhydra2
|
cd /opt/nzbhydra2
|
||||||
|
|
||||||
echo "Downloading NZBHydra2..."
|
echo "Downloading NZBHydra2..."
|
||||||
local latest=$(curl -sL "https://api.github.com/repos/theotherp/nzbhydra2/releases/latest" | grep -oP '"tag_name": "\K[^"]+' | head -1)
|
latest=$(curl -sL "https://api.github.com/repos/theotherp/nzbhydra2/releases/latest" | grep -oP "\"tag_name\": \"v\K[^\"]+")
|
||||||
[ -z "$latest" ] && latest="v6.3.2"
|
[ -z "$latest" ] && latest="8.5.2"
|
||||||
|
|
||||||
curl -L -o nzbhydra2.zip "https://github.com/theotherp/nzbhydra2/releases/download/${latest}/nzbhydra2-${latest#v}-amd64-linux.zip" || \
|
echo "Version: $latest"
|
||||||
curl -L -o nzbhydra2.zip "https://github.com/theotherp/nzbhydra2/releases/download/${latest}/nzbhydra2-${latest#v}-linux.zip"
|
curl -L -o nzbhydra2.zip "https://github.com/theotherp/nzbhydra2/releases/download/v${latest}/nzbhydra2-${latest}-generic.zip"
|
||||||
|
|
||||||
unzip -o nzbhydra2.zip
|
unzip -o nzbhydra2.zip || { echo "unzip failed"; exit 1; }
|
||||||
rm -f nzbhydra2.zip
|
rm -f nzbhydra2.zip
|
||||||
chmod +x nzbhydra2 core
|
chmod +x nzbhydra2wrapperPy3.py 2>/dev/null || true
|
||||||
|
|
||||||
apt-get clean
|
apt-get clean
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
else
|
||||||
|
echo "NZBHydra2 already installed"
|
||||||
|
# Ensure python3 is installed
|
||||||
|
if ! command -v python3 >/dev/null 2>&1; then
|
||||||
|
apt-get update
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y python3
|
||||||
|
apt-get clean
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=== Starting NZBHydra2 server ==="
|
echo "=== Starting NZBHydra2 server ==="
|
||||||
mkdir -p /config
|
mkdir -p /config
|
||||||
cd /opt/nzbhydra2
|
cd /opt/nzbhydra2
|
||||||
exec ./nzbhydra2 --datafolder /config --host 0.0.0.0 --port 5076
|
exec python3 nzbhydra2wrapperPy3.py --nobrowser --datafolder /config --host 0.0.0.0 --port 5076
|
||||||
STARTEOF
|
STARTEOF
|
||||||
chmod +x "$rootfs/start-nzbhydra.sh"
|
chmod +x "$rootfs/start-nzbhydra.sh"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user