|
|
@ -100,13 +100,14 @@ case "${ACTION}" in
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"status")
|
|
|
|
"status")
|
|
|
|
CONTAINER_NAME="generated_btcpayserver_1"
|
|
|
|
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
|
|
|
|
if [ -z "$CONTAINER_STATUS" ]; then
|
|
|
|
echo "${APP_NAME} is not installed"
|
|
|
|
echo "${APP_NAME} is not installed"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "${CONTAINER_STATUS}"
|
|
|
|
echo "${CONTAINER_STATUS}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
"port")
|
|
|
|
"port")
|
|
|
|
APP_NAME="btcpayserver"
|
|
|
|
APP_NAME="btcpayserver"
|
|
|
|
CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${APP_NAME}" --format '{{.Names}}')
|
|
|
|
CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${APP_NAME}" --format '{{.Names}}')
|
|
|
|