diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-08-22 11:32:16 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-08-22 11:32:16 +0000 |
commit | 3d9af02ed3a55279cc7292b8e376880b061585bb (patch) | |
tree | 39dff7fa19d1a99482e81b71864b2d290196f084 /misc/init.d/suse | |
parent | bb54609ec23bb9c399aede0ff8acb49fe8284fb9 (diff) | |
download | zabbix-3d9af02ed3a55279cc7292b8e376880b061585bb.tar.gz zabbix-3d9af02ed3a55279cc7292b8e376880b061585bb.tar.xz zabbix-3d9af02ed3a55279cc7292b8e376880b061585bb.zip |
- added SuSE 9.1 startup scripts. Thanks to A.Tophofen. (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1392 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'misc/init.d/suse')
-rw-r--r-- | misc/init.d/suse/9.1/zabbix_agentd | 70 | ||||
-rw-r--r-- | misc/init.d/suse/9.1/zabbix_suckerd | 70 |
2 files changed, 140 insertions, 0 deletions
diff --git a/misc/init.d/suse/9.1/zabbix_agentd b/misc/init.d/suse/9.1/zabbix_agentd new file mode 100644 index 00000000..f89b2198 --- /dev/null +++ b/misc/init.d/suse/9.1/zabbix_agentd @@ -0,0 +1,70 @@ +#! /bin/sh +# Copyright (c) 07/2004 A.Tophofen, Germany +# +# init.d/zabbix_agentd +# +### BEGIN INIT INFO +# Provides: zabbix_agentd +# Required-Start: $network $remote_fs $syslog +# Required-Stop: +# Default-Start: 3 +# Default-Stop: +# Description: Starts Zabbix_Agentd +### END INIT INFO + +. /etc/rc.status +rc_reset +NAME="Zabbix_Agentd" +CONFIG_FILE="/etc/zabbix/zabbix_agentd.conf" + +if [ ! -f ${CONFIG_FILE} ]; then + echo -n "${NAME}configuration file ${CONFIG_FILE} does not exist. " + # Tell the user this has skipped + rc_status -s + exit 6 +fi + +ZABBIX_BIN="/home/zabbix/bin/zabbix_agentd" +ZABBIX_PID="/home/zabbix/lock/zabbix_agentd.pid" + + +if [ ! -x ${ZABBIX_BIN} ] ; then + echo -n "${ZABBIX_BIN} not installed! " + # Tell the user this has skipped + rc_status -s + exit 5 +fi + + +export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/home/zabbix/bin" + +case "$1" in + start) + echo -n "Starting ${NAME} " + checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN} + case $? in + 0) echo -n "- Warning: ${NAME} already running! " ;; + 1) echo -n "- Warning: ${ZABBIX_PID} exists! " ;; + esac + + startproc -p ${ZABBIX_PID} ${ZABBIX_BIN} -u zabbix + rc_status -v + ;; + stop) + echo -n "Shutting down ${NAME}" + checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN} || echo -n "- Warning: ${NAME} not running! " + killproc -p ${ZABBIX_PID} -TERM ${ZABBIX_BIN} + rc_status -v + ;; + restart) + $0 stop + $0 start + rc_status + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac +rc_exit + diff --git a/misc/init.d/suse/9.1/zabbix_suckerd b/misc/init.d/suse/9.1/zabbix_suckerd new file mode 100644 index 00000000..d51b9221 --- /dev/null +++ b/misc/init.d/suse/9.1/zabbix_suckerd @@ -0,0 +1,70 @@ +#! /bin/sh +# Copyright (c) 07/2004 A.Tophofen, Germany +# +# init.d/zabbix_agentd +# +### BEGIN INIT INFO +# Provides: zabbix_suckerd +# Required-Start: $network $remote_fs $syslog +# Required-Stop: +# Default-Start: 3 +# Default-Stop: +# Description: Starts Zabbix_Agentd +### END INIT INFO + +. /etc/rc.status +rc_reset +NAME="Zabbix_Suckerd" +CONFIG_FILE="/etc/zabbix/zabbix_suckerd.conf" + +if [ ! -f ${CONFIG_FILE} ]; then + echo -n "${NAME}configuration file ${CONFIG_FILE} does not exist. " + # Tell the user this has skipped + rc_status -s + exit 6 +fi + +ZABBIX_BIN="/home/zabbix/bin/zabbix_suckerd" +ZABBIX_PID="/home/zabbix/lock/zabbix_suckerd.pid" + + +if [ ! -x ${ZABBIX_BIN} ] ; then + echo -n "${ZABBIX_BIN} not installed! " + # Tell the user this has skipped + rc_status -s + exit 5 +fi + + +export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/home/zabbix/bin" + +case "$1" in + start) + echo -n "Starting ${NAME} " + checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN} + case $? in + 0) echo -n "- Warning: ${NAME} already running! " ;; + 1) echo -n "- Warning: ${ZABBIX_PID} exists! " ;; + esac + + startproc -p ${ZABBIX_PID} ${ZABBIX_BIN} -u zabbix + rc_status -v + ;; + stop) + echo -n "Shutting down ${NAME}" + checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN} || echo -n "- Warning: ${NAME} not running! " + killproc -p ${ZABBIX_PID} -TERM ${ZABBIX_BIN} + rc_status -v + ;; + restart) + $0 stop + $0 start + rc_status + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac +rc_exit + |