I'm having a few problems with my init.d script, and getting zabbix running.
I was running 1.6.2, with no problems, and then i upgrade to 1.6.5 by following the info in the PDF Doc.
The front end is running 1.6.5, but the server process isnt.
when i run zabbix_server from /usr/sbin - it runs 1.6.5
when i run the init.d script - it runs 1.6.2
My init.d script is as below:
Whats going on?
Can someone help me fix my init.d script run 1.6.5 please? It's probably something very simple, but i cannot do it! (I see the paths in the script, but they match fine?)
Thanks in advance,
Tom
I was running 1.6.2, with no problems, and then i upgrade to 1.6.5 by following the info in the PDF Doc.
The front end is running 1.6.5, but the server process isnt.
when i run zabbix_server from /usr/sbin - it runs 1.6.5
when i run the init.d script - it runs 1.6.2
My init.d script is as below:
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: zabbix-server
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Start zabbix-server daemon
### END INIT INFO
DAEMON=/usr/sbin/zabbix_server
NAME=zabbix_server
DESC="Zabbix server"
PID=/var/run/zabbix-server/$NAME.pid
DIR=/var/run/zabbix-server
if test ! -d "$DIR"; then
mkdir "$DIR"
chown -R zabbix:zabbix "$DIR"
fi
test -f $DAEMON || exit 0
set -e
# add these lines after "set -e"
if ! [ -d `dirname $PID` ]; then
mkdir -p `dirname $PID`s
chown zabbix:zabbix `dirname $PID`
fi
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 2>&1
;;
stop)
echo "Stopping $DESC: $NAME"
start-stop-daemon --oknodo --stop --pidfile $PID \
--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
Whats going on?
Can someone help me fix my init.d script run 1.6.5 please? It's probably something very simple, but i cannot do it! (I see the paths in the script, but they match fine?)
Thanks in advance,
Tom
Comment