client: plugins: tor: refactor check for running dfi instance

This commit is contained in:
2026-02-04 15:29:41 -08:00
parent 578b464f38
commit 810e21d7d3

View File

@@ -44,10 +44,9 @@ function tor::start()
# NOTE: proxychains.conf's [ProxyList] won't allow hostnames (or Docker network container name).
# So, to avoid conflicting IP address spaces, docker-finance will not hardcode address space.
# Ergo, a already-running container will be needed (sorry, lib_docker::run())
if ! docker container inspect -f '{{.State.Running}}' "$global_container" &>/dev/null; then
lib_utils::die_fatal "docker-finance not running! Bring \`up\` container and try again."
fi
# Ergo, an already-running container will be needed (sorry, lib_docker::run())
lib_docker::exec "" \
|| lib_utils::die_fatal "docker-finance not running! Bring \`up\` a \`dfi\` instance and try again."
local -r _torrc="/etc/tor/torrc"