Package: zabbix
Version: 1.6.4-1
There is no way to request the status of the Zabbix agent ( or server
for that matter ) from the init script. This easy little addition
enables the status parameter.
--- /etc/init.d/zabbix-agent.orig 2009-04-15 14:54:27.000000000 +0200
+++ /etc/init.d/zabbix-agent 2009-04-15 15:00:54.000000000 +0200
@@ -34,6 +34,16 @@
sleep 5
$0 start
;;
+ status)
+ ls -l /proc/`cat $PID`/exe &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo "Zabbix agent is running"
+ exit 0
+ else
+ echo "Zabbix agent is NOT running"
+ exit 1
+ fi
+ ;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2