Last change
on this file since 431 was
431,
checked in by bastiaans, 16 years ago
|
Makefile:
jobmond/jobmond.py:
- fix to pidfile arg parsing
- fix to native gmetric unit handling
pkg/rpm/init.d/jobmond:
- updated as a proper redhat based init script
pkg/rpm/jobmonarch-jobmond.spec:
- call chkconfig in preun not postun
|
-
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 | if [ -r /etc/sysconfig/$name ]; then |
---|
22 | source /etc/sysconfig/$name |
---|
23 | fi |
---|
24 | |
---|
25 | start() { |
---|
26 | echo -n $"Starting $desc: " |
---|
27 | daemon $prog $OPTIONS |
---|
28 | RETVAL=$? |
---|
29 | echo |
---|
30 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name |
---|
31 | return $RETVAL |
---|
32 | } |
---|
33 | |
---|
34 | stop() { |
---|
35 | echo -n $"Stopping $desc: " |
---|
36 | killproc $prog |
---|
37 | RETVAL=$? |
---|
38 | echo |
---|
39 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name |
---|
40 | return $RETVAL |
---|
41 | } |
---|
42 | |
---|
43 | restart() { |
---|
44 | stop |
---|
45 | start |
---|
46 | } |
---|
47 | |
---|
48 | case "$1" in |
---|
49 | start) |
---|
50 | start |
---|
51 | ;; |
---|
52 | stop) |
---|
53 | stop |
---|
54 | ;; |
---|
55 | restart) |
---|
56 | restart |
---|
57 | ;; |
---|
58 | condrestart) |
---|
59 | [ -e /var/lock/subsys/$name ] && restart |
---|
60 | RETVAL=$? |
---|
61 | ;; |
---|
62 | status) |
---|
63 | status python |
---|
64 | RETVAL=$? |
---|
65 | ;; |
---|
66 | *) |
---|
67 | echo $"Usage: $0 {start|stop|restart|condrestart|status}" |
---|
68 | RETVAL=1 |
---|
69 | esac |
---|
70 | |
---|
71 | exit $RETVAL |
---|
Note: See
TracBrowser
for help on using the repository browser.