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/fedora | |
| 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/fedora')
| -rwxr-xr-x | misc/init.d/fedora/core5/zabbix_agentd | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/misc/init.d/fedora/core5/zabbix_agentd b/misc/init.d/fedora/core5/zabbix_agentd new file mode 100755 index 00000000..84dc2562 --- /dev/null +++ b/misc/init.d/fedora/core5/zabbix_agentd @@ -0,0 +1,79 @@ +#!/bin/bash +# +# /etc/rc.d/init.d/dovecot +# +# Starts the zabbix_agentd daemon +# +# chkconfig: - 95 5 +# description: Zabbix Monitoring Agent +# processname: zabbix_agentd +# pidfile: /var/tmp/zabbix_agentd.pid + +# Source function library. + +. /etc/init.d/functions + +RETVAL=0 +prog="Zabbix Agent" +CONFIG_FILE="/etc/zabbix/zabbix_agentd.conf" +ZABBIX_BIN="/usr/bin/zabbix_agentd" + +test -x $ZABBIX_BIN || exit 0 + +if [ ! -f ${CONFIG_FILE} ]; then + echo -n "${NAME}configuration file ${CONFIG_FILE} does not exist. " + # Tell the user this has skipped + exit 6 +fi + +if [ ! -x ${ZABBIX_BIN} ] ; then + echo -n "${ZABBIX_BIN} not installed! " + # Tell the user this has skipped + exit 5 +fi + +start() { + echo -n $"Starting $prog: " + daemon $ZABBIX_BIN -c $CONFIG_FILE + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix_agentd + echo +} + +stop() { + echo -n $"Stopping $prog: " + killproc $ZABBIX_BIN + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix_agentd + echo +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload|restart) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/zabbix_agentd ]; then + stop + start + fi + ;; + status) + status $ZABBIX_BIN + RETVAL=$? + ;; + *) + echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}" + exit 1 +esac + +exit $RETVAL + |
