HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
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