|
|
|
@ -177,8 +177,8 @@ case "${ACTION}" in
|
|
|
|
|
;;
|
|
|
|
|
"status")
|
|
|
|
|
APP_NAME="frigate"
|
|
|
|
|
CONTAINER_NAMES=$(docker ps -a --filter "name=${APP_NAME}" --format '{{.Names}}')
|
|
|
|
|
CONTAINER_STATUS=$(docker ps --all --filter "name=${CONTAINER_NAMES}" --format '{{.Status}}' | awk '/^Up/ { print "up " substr($0, 4) } !/^Up/ && /.+/ { print "down" }')
|
|
|
|
|
CONTAINER_NAME=$(docker ps -a --filter "name=${APP_NAME}" --format '{{.Names}}')
|
|
|
|
|
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
|
|
|
|
|