Last change
on this file since 437 was
437,
checked in by bastiaans, 16 years ago
|
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # Init file for the Job Monitoring Daemon |
---|
4 | # |
---|
5 | # chkconfig: 2345 20 80 |
---|
6 | # description: jobmond reports information on batch jobs as Ganglia metrics |
---|
7 | # |
---|
8 | # processname: jobmond |
---|
9 | # config: /etc/jobmond.conf |
---|
10 | # config: /etc/sysconfig/jobmond |
---|
11 | # pidfile: /var/run/jobmond |
---|
12 | |
---|
13 | # Source function library. |
---|
14 | . /etc/rc.d/init.d/functions |
---|
15 | |
---|
16 | RETVAL=0 |
---|
17 | name=jobmond |
---|
18 | prog=/usr/sbin/jobmond |
---|
19 | desc="Job Monitoring Daemon" |
---|
20 | |
---|
21 | OPTIONS="" |
---|
22 | |
---|
23 | if [ -r /etc/sysconfig/$name ]; then |
---|
24 | source /etc/sysconfig/$name |
---|
25 | fi |
---|
26 | |
---|
27 | start() { |
---|
28 | echo -n $"Starting $desc: " |
---|
29 | daemon $prog -p /var/run/$name.pid $OPTIONS |
---|
30 | RETVAL=$? |
---|
31 | echo |
---|
32 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name |
---|
33 | return $RETVAL |
---|
34 | } |
---|
35 | |
---|
36 | stop() { |
---|
37 | echo -n $"Stopping $desc: " |
---|
38 | killproc $prog |
---|
39 | RETVAL=$? |
---|
40 | echo |
---|
41 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name |
---|
42 | return $RETVAL |
---|
43 | } |
---|
44 | |
---|
45 | restart() { |
---|
46 | stop |
---|
47 | start |
---|
48 | } |
---|
49 | |
---|
50 | case "$1" in |
---|
51 | start) |
---|
52 | start |
---|
53 | ;; |
---|
54 | stop) |
---|
55 | stop |
---|
56 | ;; |
---|
57 | restart) |
---|
58 | restart |
---|
59 | ;; |
---|
60 | condrestart) |
---|
61 | [ -e /var/lock/subsys/$name ] && restart |
---|
62 | RETVAL=$? |
---|
63 | ;; |
---|
64 | status) |
---|
65 | status python |
---|
66 | RETVAL=$? |
---|
67 | ;; |
---|
68 | *) |
---|
69 | echo $"Usage: $0 {start|stop|restart|condrestart|status}" |
---|
70 | RETVAL=1 |
---|
71 | esac |
---|
72 | |
---|
73 | exit $RETVAL |
---|
Note: See
TracBrowser
for help on using the repository browser.