HEX
Server: Apache
System: Linux iad1-shared-e1-13 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: dh_x7ke6i (5503775)
PHP: 7.4.33
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