forked from EvergreenCrypto/docker-finance
client: plugins: tor: fix inspection for running tor container
This commit is contained in:
@@ -50,7 +50,7 @@ function tor::start()
|
|||||||
|
|
||||||
local -r _torrc="/etc/tor/torrc"
|
local -r _torrc="/etc/tor/torrc"
|
||||||
|
|
||||||
if docker container inspect -f '{{.State.Running}}' "$tor_container" &>/dev/null; then
|
if [[ $(docker container inspect -f '{{.State.Running}}' "$tor_container" 2>/dev/null) == "true" ]]; then
|
||||||
lib_utils::print_error "${tor_container}: instance already running (consider \`restart\`)"
|
lib_utils::print_error "${tor_container}: instance already running (consider \`restart\`)"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user