secubox-openwrt/package/secubox/secubox-app-nzbhydra/files/etc/init.d/nzbhydra
CyberMind-FR aef0284b44 feat(newsbin): Add Usenet search and download system
New packages for Usenet/NZB workflow:
- secubox-app-sabnzbd: NZB downloader (LXC container)
  - EWEKA NNTP credentials pre-configured
  - Docker image extraction to LXC
  - HAProxy SSL exposure support
- secubox-app-nzbhydra: Meta search indexer (LXC container)
  - Aggregates multiple NZB indexers
  - Newznab API for Sonarr/Radarr integration
  - SABnzbd auto-linking
- luci-app-newsbin: Unified LuCI dashboard
  - Status cards (speed, queue, disk)
  - Meta-search with download buttons
  - Queue monitoring with progress bars
  - History view

CLI: sabnzbdctl, nzbhydractl (install/start/status/search)
LuCI: Services > Newsbin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-14 15:31:46 +01:00

39 lines
812 B
Bash

#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
CONTAINER_NAME="nzbhydra"
start_service() {
local enabled
config_load nzbhydra
config_get enabled main enabled '0'
[ "$enabled" = "1" ] || return 0
if lxc-info -n "$CONTAINER_NAME" >/dev/null 2>&1; then
lxc-start -n "$CONTAINER_NAME" -d 2>/dev/null
logger -t nzbhydra "NZBHydra container started"
else
logger -t nzbhydra "Container not installed. Run: nzbhydractl install"
fi
}
stop_service() {
if lxc-info -n "$CONTAINER_NAME" 2>/dev/null | grep -q "RUNNING"; then
lxc-stop -n "$CONTAINER_NAME" -t 30
logger -t nzbhydra "NZBHydra container stopped"
fi
}
reload_service() {
stop_service
start_service
}
service_triggers() {
procd_add_reload_trigger "nzbhydra"
}