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>
37 lines
1.3 KiB
Bash
Executable File
37 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
checkDockerNetworkRequirement()
|
|
{
|
|
if [[ $CFG_REQUIREMENT_DOCKER_NETWORK == "true" ]]; then
|
|
if [[ $CFG_DOCKER_INSTALL_TYPE == "rootless" ]]; then
|
|
if dockerCommandRun "docker network inspect $CFG_NETWORK_NAME > /dev/null 2>&1"; then
|
|
local current_subnet=$(dockerCommandRun "docker network inspect $CFG_NETWORK_NAME --format '{{range .IPAM.Config}}{{.Subnet}}{{end}}' 2>/dev/null")
|
|
|
|
if [[ "$current_subnet" == "$CFG_NETWORK_SUBNET" ]]; then
|
|
isSuccessful "Docker Network $CFG_NETWORK_NAME exists with matching subnet"
|
|
else
|
|
updateDockerNetworkConfig "$current_subnet"
|
|
fi
|
|
else
|
|
isNotice "Docker Network $CFG_NETWORK_NAME not found."
|
|
DOCKER_NETWORK_SETUP_NEEDED="true"
|
|
((preinstallneeded++))
|
|
fi
|
|
elif [[ $CFG_DOCKER_INSTALL_TYPE == "rooted" ]]; then
|
|
if docker network inspect $CFG_NETWORK_NAME > /dev/null 2>&1; then
|
|
local current_subnet=$(docker network inspect $CFG_NETWORK_NAME --format '{{range .IPAM.Config}}{{.Subnet}}{{end}}' 2>/dev/null)
|
|
|
|
if [[ "$current_subnet" == "$CFG_NETWORK_SUBNET" ]]; then
|
|
isSuccessful "Docker Network $CFG_NETWORK_NAME exists with matching subnet"
|
|
else
|
|
updateDockerNetworkConfig "$current_subnet"
|
|
fi
|
|
else
|
|
isNotice "Docker Network $CFG_NETWORK_NAME not found."
|
|
DOCKER_NETWORK_SETUP_NEEDED="true"
|
|
((preinstallneeded++))
|
|
fi
|
|
fi
|
|
fi
|
|
}
|