HEX
Server: Apache
System: Linux pdx1-shared-a2-09 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_pvsc7i (5084578)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/local/bin/zabbix/zbx_docker_inspect.sh
#!/bin/bash

if [ -z $1 ]; then
	echo "Please pass in the name/ID of the container to inspect"
	exit 1
elif [[ $(sudo docker inspect -f '{{.State.Running}}' $1 2>/dev/null) == 'true' ]]; then
	echo 1
	exit 0
else
	echo 0
	exit 0
fi