The given redhat initscript for the agentd from 1.1.1.tar.gz didn't remove the PID-File correctly from "/var/run/zabbix/" on my Fedora Core 4 system. So i modified the script a bit:
just copied the given initscript into /etc/init.d and added the line "rm -f $PIDFILE" as shown here:
this works for me...
just copied the given initscript into /etc/init.d and added the line "rm -f $PIDFILE" as shown here:
Code:
...
# perform action based on args
for ARG in $@ $ARGS
do
# check if PIDFILE exists and ensure is not zero size and react accordingly
if [ -f $PIDFILE ] && [ -s $PIDFILE ] ; then
PID=`cat $PIDFILE`
if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
STATUS="zabbix_agentd (pid $PID) running"
RUNNING=1
else
STATUS="zabbix_agentd (pid $PID?) not running"
[color=red]rm -f $PIDFILE[/color]
RUNNING=0
fi
else
STATUS="zabbix_agentd (no pid file) not running"
RUNNING=0
fi
...

