Ubuntu

Comment 2 for bug 96644

Fix for the server
https://bugs.launchpad.net/ubuntu/+source/zabbix/+bug/172775

Fixed /etc/init.d/zabbix-agent
#! /bin/sh
### BEGIN INIT INFO
# Provides: zabbix-agent
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Start zabbix-agent daemon
### END INIT INFO
DAEMON=/usr/sbin/zabbix_agentd
NAME=zabbix_agentd
DESC="Zabbix agent"
PID=/var/run/zabbix-agent/$NAME.pid
### BEGIN /var/run Fix

DIR=/var/run/zabbix-agent

if test ! -d "$DIR"; then
        mkdir "$DIR"
        chown -R zabbix:zabbix "$DIR"
fi

### END /var/run Fix
test -f $DAEMON || exit 0

set -e

export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"

case "$1" in
  start)
     rm -f $PID
 echo "Starting $DESC: $NAME"
 start-stop-daemon --oknodo --start --pidfile $PID \
  --exec $DAEMON < /dev/null &> /dev/null
 ;;
  stop)
 echo "Stopping $DESC: $NAME"
 start-stop-daemon --oknodo --stop --exec $DAEMON
 ;;
  restart|force-reload)
 $0 stop
 sleep 2
 $0 start
 ;;
  *)
 N=/etc/init.d/$NAME
 echo "Usage: $N {start|stop|restart|force-reload}" >&2
 exit 1
 ;;
esac

exit 0