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

Last change on this file since 437 was 437, checked in by bastiaans, 15 years ago
  • more pkg fixes
  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[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]16RETVAL=0
17name=jobarchived
18prog=/usr/sbin/jobarchived
19desc="Job Archiving Daemon"
[378]20
[437]21OPTIONS=""
22
[435]23if [ -r /etc/sysconfig/$name ]; then
24        source /etc/sysconfig/$name
25fi
[378]26
[435]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}
[378]35
[435]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
[378]50case "$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]71esac
72
[435]73exit $RETVAL
Note: See TracBrowser for help on using the repository browser.