Current File : //opt/zabbix/scripts/base/check_hermes.sh
#!/bin/bash
#FOREVER="$(which forever)" - Changed because in AlmaLinux the path for forever is /usr/local/bin and the Zabbix Anget nologin user does not see that path
FOREVER=$(whereis forever | awk '{print $NF}')
valor=`$FOREVER list | grep hermes | grep STOPPED | wc -l`

if [ $valor != "1" ]; then
        zabbix=0
#echo primeiro if $zabbix
fi

if [ -z $zabbix ]; then
zabbix=1
echo $zabbix
else
echo $zabbix
fi