File: jmond.init

package info (click to toggle)
jmon 0.3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 108 kB
  • ctags: 76
  • sloc: ansic: 569; sh: 77; makefile: 76
file content (42 lines) | stat: -rwxr-xr-x 757 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#
# chkconfig: 345 77 77
# description: jmond is the daemon part of the jmon suite. jMon can be used \
# for remote resource monitoring on large networks.
# PID file: /var/run/jmond.pid
# Lock file: /var/lock/subsys/jmond
#

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
	echo -n "Starting jmond: "
	daemon /usr/sbin/jmond
    echo
	touch /var/lock/subsys/jmond
	;;
  stop)
	echo -n "Stopping jmond: "
	[ -f /var/run/jmond.pid ] || exit 0
	kill -TERM `cat /var/run/jmond.pid`
	rm -f /var/run/jmond.pid
	rm -f /var/lock/subsys/jmond
	echo "jmond"
	;;
  restart)
	$0 stop
	$0 start
	;;
  status)
	status jmond
	;;
  *)
	echo "Usage: jmond {start|stop|restart|status}"
	exit 1
esac

exit 0