librelad 875a60f90f LibrePortal v0.1.0 — initial release
A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys,
Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun
VPN routing, and a web dashboard to manage it all.

Free & open forever to self-host; optional paid hosted services fund it.
See PROMISE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-21 20:37:54 +01:00

25 lines
928 B
Bash
Executable File

#!/bin/bash
dockerPruneAppNetworks()
{
if [[ $CFG_REQUIREMENT_DOCKER_NETWORK_PRUNE == "true" ]]; then
local app_name="$1"
if [ ! -z "$app_name" ]; then
local networks_found=false
# Prune all networks except those containing the specified app_name
for network_id in $(docker network ls --quiet); do
network_name=$(docker network inspect --format '{{.Name}}' "$network_id")
if [[ "$network_name" == *"$app_name"* ]]; then
local result=$(dockerCommandRun "docker network rm "$network_id"")
checkSuccess "Removing the unused docker network - $network_name"
networks_found=true
fi
done
if [ "$networks_found" = false ]; then
isSuccessful "No unused networks found for $app_name"
fi
fi
fi
}