|
|
|
@ -100,13 +100,14 @@ case "${ACTION}" in
|
|
|
|
|
;;
|
|
|
|
|
"status")
|
|
|
|
|
CONTAINER_NAME="generated_btcpayserver_1"
|
|
|
|
|
CONTAINER_STATUS=$(docker ps --all --filter "name=${CONTAINER_NAME}" --format '{{.Status}}' | awk -F' ' '{print $1, $2, $3}')
|
|
|
|
|
CONTAINER_STATUS=$(docker ps --all --filter "name=${CONTAINER_NAME}" --format '{{.Status}}' | awk '/^Up/ { print "up " substr($0, 4) } !/^Up/ && /.+/ { print "down" }')
|
|
|
|
|
if [ -z "$CONTAINER_STATUS" ]; then
|
|
|
|
|
echo "${APP_NAME} is not installed"
|
|
|
|
|
else
|
|
|
|
|
echo "${CONTAINER_STATUS}"
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
"port")
|
|
|
|
|
APP_NAME="btcpayserver"
|
|
|
|
|
CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${APP_NAME}" --format '{{.Names}}')
|
|
|
|
|