Hello, I have got one issue what is really pissing me off. And I don't know the root cause of this problem: is it problem somewhere in Zabbix world or personal (installed on me dependency curve-hands.dll) Such I am begginer in Linux world. I have got problem with Zabbix server restart.
System Centos 5.5. and Zabbix 1.8.4. When the server is restarted or booted up the Zabbix agent start automatically but the Zabbix server service is not starting up. Both init.d scripts are taken from the official Zabbix package.
First thing what I checked was runlevels. And it's added as 3 and 5. Chmod and owner for init.d script is also the same. I am starting to think maybe script is wrong on my system. Script is posted below.
Yes I know it's basic newbie question, but be please kind and help me
System Centos 5.5. and Zabbix 1.8.4. When the server is restarted or booted up the Zabbix agent start automatically but the Zabbix server service is not starting up. Both init.d scripts are taken from the official Zabbix package.
First thing what I checked was runlevels. And it's added as 3 and 5. Chmod and owner for init.d script is also the same. I am starting to think maybe script is wrong on my system. Script is posted below.
Code:
#!/bin/bash
#
# chkconfig: - 55 45
# description: zabbix_server
# probe: false
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up. If you are running without a network, comment this out.
[ "${NETWORKING}" = "no" ] && exit 0
RETVAL=0
progdir="/usr/local/sbin/"
prog="zabbix_server"
start() {
# Start daemons.
if [ -n "`/sbin/pidof $prog`" ]; then
echo -n "$prog: already running"
failure $"$prog start"
echo
return 1
fi
echo -n $"Starting $prog: "
# we can't seem to use daemon here - emulate its functionality
su -c $progdir$prog - $USER
RETVAL=$?
usleep 100000
if [ -z "`/sbin/pidof $progdir$prog`" ]; then
RETVAL=1
fi
[ $RETVAL -ne 0 ] && failure $"$prog startup"
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog && success $"$prog startup"
echo
return $RETVAL
}
stop() {
RETVAL=0
pid=
# Stop daemons.
echo -n $"Stopping $prog: "
pid=`/sbin/pidof -s $prog`
if [ -n "$pid" ]; then
kill -TERM $pid
else
failure $"$prog stop"
echo
return 1
fi
RETVAL=$?
[ $RETVAL -ne 0 ] && failure $"$prog stop"
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog && success $"$prog stop"
echo
return $RETVAL
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/$prog ] && restart
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
exit 1
esac
exit $?
Comment