[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: Gé Janssen <ge.janssen (at) gmail.com>
- Date: Mon, 25 Jan 2010 22:39:57 +0100
- References: <4B5CF4E6.3060307 (at) logicaltech.com.au> <20100125084907.165230 (at) gmx.net> <5B1841FCD13E944EAC1CAFA4AE3863DB163162E6D5 (at) pfo-ex002.aii.aiinformatics.com>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100104 SeaMonkey/2.0.2
He Ralf,
Hereby my version for opensuse 11.x. See attachment.
please mind my not standard installation of xymon in /opt/monitor/xymon.
This requires some editing.
You can install it using insserv or chkconfig:
callisto:/opt/monitor/xymon/server/etc # cp xymon.opensuse11
/etc/init.d/xymon
callisto:/opt/monitor/xymon/server/etc # cd /etc/init.d/
callisto:/etc/init.d # chmod a+x xymon
callisto:/etc/init.d # chkconfig --add xymon
xymon 0:off 1:off 2:off 3:on 4:off 5:on 6:off
callisto:/etc/init.d # chkconfig --list xymon
xymon 0:off 1:off 2:off 3:on 4:off 5:on 6:off
callisto:/etc/init.d # service xymon start
Starting xymon: Hobbit started
Hobbit client for linux started on callisto
callisto:/etc/init.d #
Regards,
Gé
Reinartz Ralf AII.Pforzheim wrote:
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
#!/bin/bash
#
# /etc/rc.d/init.d/xymon
#
# Starts the xymon monitor daemon
#
## chkconfig: 345 95 5
## description: Runs xymon the monitortool
## processname: hobbitd
### BEGIN INIT INFO
# Provides: xymon
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the xymon monitor server
### END INIT INFO
RETVAL=0
#
# See how we were called.
#
prog="xymon"
start() {
# Check if xymon is already running
echo -n $"Starting $prog: "
su - xymon -c "/opt/monitor/xymon/server/hobbit.sh start"
su - xymon -c "/opt/monitor/xymon/client/runclient.sh start"
}
stop() {
echo -n $"Stopping $prog: "
su - xymon -c "/opt/monitor/xymon/server/hobbit.sh stop"
su - xymon -c "/opt/monitor/xymon/client/runclient.sh stop"
}
restart() {
echo -n $"restarting $prog: "
su - xymon -c "/opt/monitor/xymon/server/hobbit.sh restart"
su - xymon -c "/opt/monitor/xymon/client/runclient.sh restart"
}
status() {
echo -n $"status $prog: "
su - xymon -c "/opt/monitor/xymon/server/hobbit.sh status"
su - xymon -c "/opt/monitor/xymon/client/runclient.sh status"
}
reload() {
restart
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $?
exit $RETVAL