diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-28 13:32:10 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-28 13:32:10 +0000 |
commit | 3442ec61fa38eea4e68a3edea4ea3225ff78c8a0 (patch) | |
tree | 3ebf399a0be7c8ca22745e08ae2c0b4e300a86e5 /misc/init.d/redhat | |
parent | fb8127285b3156270151079a29825130cf85d524 (diff) | |
download | zabbix-3442ec61fa38eea4e68a3edea4ea3225ff78c8a0.tar.gz zabbix-3442ec61fa38eea4e68a3edea4ea3225ff78c8a0.tar.xz zabbix-3442ec61fa38eea4e68a3edea4ea3225ff78c8a0.zip |
- modifed startup scripts (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4187 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'misc/init.d/redhat')
-rw-r--r-- | misc/init.d/redhat/8.0/zabbix_server (renamed from misc/init.d/redhat/8.0/zabbix_suckerd) | 4 | ||||
-rw-r--r-- | misc/init.d/redhat/8.0/zabbix_trapperd | 87 | ||||
-rwxr-xr-x | misc/init.d/redhat/zabbix_server_ctl (renamed from misc/init.d/redhat/zabbix_suckerd_ctl) | 50 |
3 files changed, 27 insertions, 114 deletions
diff --git a/misc/init.d/redhat/8.0/zabbix_suckerd b/misc/init.d/redhat/8.0/zabbix_server index 0263e3bd..6cea792e 100644 --- a/misc/init.d/redhat/8.0/zabbix_suckerd +++ b/misc/init.d/redhat/8.0/zabbix_server @@ -1,7 +1,7 @@ #!/bin/bash # # chkconfig: - 55 45 -# description: zabbix_suckerd +# description: zabbix_server # probe: false # Source function library. @@ -15,7 +15,7 @@ RETVAL=0 progdir="/usr/local/zabbix/bin/" -prog="zabbix_suckerd" +prog="zabbix_server" start() { # Start daemons. diff --git a/misc/init.d/redhat/8.0/zabbix_trapperd b/misc/init.d/redhat/8.0/zabbix_trapperd deleted file mode 100644 index 546f96a6..00000000 --- a/misc/init.d/redhat/8.0/zabbix_trapperd +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -# -# chkconfig: - 55 45 -# description: zabbix_trapperd -# 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/zabbix/bin/" -prog="zabbix_trapperd" - -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 - # The child processes have died after fork()ing, e.g. - # because of a broken config file - 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/zabbix_trapperd ] && restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart}" - exit 1 -esac - -exit $? - diff --git a/misc/init.d/redhat/zabbix_suckerd_ctl b/misc/init.d/redhat/zabbix_server_ctl index 7580690b..52a2a685 100755 --- a/misc/init.d/redhat/zabbix_suckerd_ctl +++ b/misc/init.d/redhat/zabbix_server_ctl @@ -1,8 +1,8 @@ #!/bin/sh # -# zabbix_suckerd_ctl +# zabbix_server_ctl # -# control script to stop/start/restart zabbix_suckerd +# control script to stop/start/restart zabbix_server # author: charlie collins # date: 01.21.2002 # @@ -18,10 +18,10 @@ # 0 - operation completed successfully # 1 - # 2 - usage error -# 3 - zabbix_suckerd could not be started -# 4 - zabbix_suckerd could not be stopped -# 5 - zabbix_suckerd could not be started during a restart -# 6 - zabbix_suckerd could not be restarted during a restart +# 3 - zabbix_server could not be started +# 4 - zabbix_server could not be stopped +# 5 - zabbix_server could not be started during a restart +# 6 - zabbix_server could not be restarted during a restart # # # @@ -35,9 +35,9 @@ # base zabbix dir BASEDIR=/opt/zabbix # PID file -PIDFILE=/var/tmp/zabbix_suckerd.pid +PIDFILE=/var/tmp/zabbix_server.pid # binary file -ZABBIX_SUCKERD=$BASEDIR/bin/zabbix_suckerd +ZABBIX_SUCKERD=$BASEDIR/bin/zabbix_server # ************** @@ -59,14 +59,14 @@ do if [ -f $PIDFILE ] && [ -s $PIDFILE ] ; then PID=`cat $PIDFILE` if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then - STATUS="zabbix_suckerd (pid $PID) running" + STATUS="zabbix_server (pid $PID) running" RUNNING=1 else - STATUS="zabbix_suckerd (pid $PID?) not running" + STATUS="zabbix_server (pid $PID?) not running" RUNNING=0 fi else - STATUS="zabbix_suckerd (no pid file) not running" + STATUS="zabbix_server (no pid file) not running" RUNNING=0 fi @@ -75,13 +75,13 @@ do start) if [ $RUNNING -eq 1 ]; then - echo "$0 $ARG: zabbix_suckerd (pid $PID) already running" + echo "$0 $ARG: zabbix_server (pid $PID) already running" continue fi if $ZABBIX_SUCKERD ; then - echo "$0 $ARG: zabbix_suckerd started" + echo "$0 $ARG: zabbix_server started" else - echo "$0 $ARG: zabbix_suckerd could not be started" + echo "$0 $ARG: zabbix_server could not be started" ERROR=3 fi ;; @@ -93,32 +93,32 @@ do continue fi if kill $PID ; then - echo "$0 $ARG: zabbix_suckerd process(es) stopped" + echo "$0 $ARG: zabbix_server process(es) stopped" else - echo "$0 $ARG: zabbix_suckerd process(es) could not be stopped" + echo "$0 $ARG: zabbix_server process(es) could not be stopped" ERROR=4 fi ;; restart) if [ $RUNNING -eq 0 ]; then - echo "$0 $ARG: zabbix_suckerd not running, trying to start" + echo "$0 $ARG: zabbix_server not running, trying to start" if $ZABBIX_SUCKERD ; then - echo "$0 $ARG: zabbix_suckerd started" + echo "$0 $ARG: zabbix_server started" else - echo "$0 $ARG: zabbix_suckerd could not be started" + echo "$0 $ARG: zabbix_server could not be started" ERROR=5 fi else if kill $PID ; then if $ZABBIX_SUCKERD ; then - echo "$0 $ARG: zabbix_suckerd restarted" + echo "$0 $ARG: zabbix_server restarted" else - echo "$0 $ARG: zabbix_suckerd could not be started" + echo "$0 $ARG: zabbix_server could not be started" ERROR=3 fi else - echo "$0 $ARG: zabbix_suckerd could not be restarted" + echo "$0 $ARG: zabbix_server could not be restarted" ERROR=6 fi fi @@ -129,9 +129,9 @@ do echo "usage: $0 (start|stop|restart|help)" cat <<EOF -start - start zabbix_suckerd -stop - stop zabbix_suckerd -restart - restart zabbix_suckerd if running by sending a SIGHUP or start if not running +start - start zabbix_server +stop - stop zabbix_server +restart - restart zabbix_server if running by sending a SIGHUP or start if not running help - this screen EOF |