source: trunk/pkg/rpm/init.d/jobarchived @ 482

Last change on this file since 482 was 437, checked in by bastiaans, 17 years ago
  • more pkg fixes
  • Property svn:executable set to *
File size: 1.1 KB
Line 
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
12
13# Source function library.
14. /etc/rc.d/init.d/functions
15
16RETVAL=0
17name=jobarchived
18prog=/usr/sbin/jobarchived
19desc="Job Archiving Daemon"
20
21OPTIONS=""
22
23if [ -r /etc/sysconfig/$name ]; then
24        source /etc/sysconfig/$name
25fi
26
27start() {
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
36stop() {
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
45restart() {
46        stop
47        start
48}
49
50case "$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
71esac
72
73exit $RETVAL
Note: See TracBrowser for help on using the repository browser.