LibrePortal/scripts/cli/commands/system/cli_system_header.sh
librelad 20f8ca2eb5 feat(network): detect + heal apps stranded off the docker subnet
Closes the gap behind the vpn-recreate bug: when the shared network is
recreated with a different /24, every app's stored static IP is left
outside it and adoptDockerSubnet only realigns CFG, not the apps.

- networkScanConflicts (network_conflicts.sh): read-only scan diffing each
  active network_resources IP against docker's real subnet (via ipInSubnet).
  Per-service routing-aware — skips gateway-routed services whose ipv4 is
  commented out in the deployed compose, so gluetun apps don't false-positive.
  Distinguishes 'daemon down' (benign) from 'network missing' (real).

- webuiSystemNetworkCheck (webui_system_network.sh): self-throttled generator
  that writes frontend/data/system/network_status.json (modelled on
  verify_status.json). Wired into webuiSystemUpdate AND run unconditionally
  every ~60s from the task-processor poll (regen webui is mtime-gated and
  would never fire on drift, which touches no source file).

- networkHealConflicts (network_heal.sh) + 'libreportal system network
  check|heal [app]': the heal adopts docker's subnet in-process, then re-IPs
  stranded apps with reset_network=ip (ports preserved), gluetun first.
  Mutating path runs only through the task system (dual-mode, like update
  apply); read-only check runs inline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 16:03:53 +01:00

20 lines
879 B
Bash
Executable File

#!/bin/bash
# System Commands Header
# Shows available system commands and help information
cliShowSystemHelp()
{
echo ""
echo "Available System Commands:"
echo ""
echo " libreportal system status - Show overall system status"
echo " libreportal system update - Update LibrePortal to latest version"
echo " libreportal system reset - Reinstall LibrePortal install files"
echo " libreportal system reclaim - Reclaim Docker space (build cache + dangling images)"
echo " libreportal system image rm [--force] <ids> - Remove specific images (comma-separated ids)"
echo " libreportal system network check - Re-scan for apps stranded off the docker subnet"
echo " libreportal system network heal [app] - Re-IP stranded apps from the current subnet (ports kept)"
echo ""
}