[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Initscript for Suse?
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Initscript for Suse?
- From: Andreas Kunberger <andreas.kunberger (at) itv-denkendorf.de>
- Date: Tue, 26 Jan 2010 08:52:35 +0100
- References: <4B5CF4E6.3060307 (at) logicaltech.com.au>
- References: <20100125084907.165230 (at) gmx.net>
- References: <5B1841FCD13E944EAC1CAFA4AE3863DB163162E6D5 (at) pfo-ex002.aii.aiinformatics.com>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Lightning/1.0b1 Thunderbird/3.0
Am 25.01.2010 17:04, schrieb Reinartz Ralf AII.Pforzheim:
> Hello all,
>
> Did anyone build an initscript for Suse 11.x for the Xymon Server?
> Unfortunally the Debian Scripts are a little bit different from the Suses Way.
>
> If not, we'll try to make one.
>
> Thanks
>
> Ralf
>
>
>
Hello,
I use the following script:
==================================
#! /bin/sh
#
# xymon This shell script takes care of starting and stopping
# xymon(the former Hobbit network monitor)
#
# chkconfig: 2345 80 20
# description: xymon is a network monitoring tool that allows \
# you to monitor hosts and services. The monitor status is available \
# via a webpage.
### BEGIN INIT INFO
# Provides: yxmon
# Required-Start: $remote_fs
# Should-Start: $named
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: Start xymon monitoring
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/lib/xymon/server/hobbit.sh
NAME=xymon
DESC=xymon
USER=xymon
test -x $DAEMON || exit 0
# Include xymon defaults if available
if [ -f /etc/sysconfig/xymon ] ; then
. /etc/sysconfig/xymon
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
su -c "$DAEMON start" - $USER
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
su -c "$DAEMON stop" - $USER
echo "$NAME."
;;
status)
echo -n "Status of $DESC: "
su -c "$DAEMON status" - $USER
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration files."
su -c "$DAEMON reload" - $USER
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
su -c "$DAEMON restart" - $USER
echo "$NAME."
;;
rotate)
echo -n "Rotating logs for $DESC: "
su -c "$DAEMON rotate" - $USER
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N
{start|stop|status|restart|(force-)reload|rotate}" >&2
exit 1
;;
esac
exit 0
==================================
mfg
Andreas
--
Institut für Textil- und Verfahrenstechnik
der Deutschen Institute für Textil- und Faserforschung Denkendorf