Last change
on this file since 437 was
437,
checked in by bastiaans, 17 years ago
|
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Rev | Line | |
---|
[435] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # Init file for the Job Archiving Daemon |
---|
| 4 | # |
---|
| 5 | # chkconfig: 2345 20 80 |
---|
| 6 | # description: jobarchived archives information on nodes in RRDS and batch jobs in SQL |
---|
| 7 | # |
---|
| 8 | # processname: jobarchived |
---|
| 9 | # config: /etc/jobarchived.conf |
---|
| 10 | # config: /etc/sysconfig/jobarchived |
---|
| 11 | # pidfile: /var/run/jobarchived |
---|
[378] | 12 | |
---|
[435] | 13 | # Source function library. |
---|
| 14 | . /etc/rc.d/init.d/functions |
---|
[378] | 15 | |
---|
[435] | 16 | RETVAL=0 |
---|
| 17 | name=jobarchived |
---|
| 18 | prog=/usr/sbin/jobarchived |
---|
| 19 | desc="Job Archiving Daemon" |
---|
[378] | 20 | |
---|
[437] | 21 | OPTIONS="" |
---|
| 22 | |
---|
[435] | 23 | if [ -r /etc/sysconfig/$name ]; then |
---|
| 24 | source /etc/sysconfig/$name |
---|
| 25 | fi |
---|
[378] | 26 | |
---|
[435] | 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 | } |
---|
[378] | 35 | |
---|
[435] | 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 | |
---|
[378] | 50 | case "$1" in |
---|
[435] | 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 |
---|
[378] | 71 | esac |
---|
| 72 | |
---|
[435] | 73 | exit $RETVAL |
---|
Note: See
TracBrowser
for help on using the repository browser.