source: trunk/pkg/rpm/init.d/jobmond @ 431

Last change on this file since 431 was 431, checked in by bastiaans, 17 years ago

Makefile:

  • updated rpm-jobmond

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
16RETVAL=0
17name=jobmond
18prog=/usr/sbin/jobmond
19desc="Job Monitoring Daemon"
20
21if [ -r /etc/sysconfig/$name ]; then
22        source /etc/sysconfig/$name
23fi
24
25start() {
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
34stop() {
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
43restart() {
44        stop
45        start
46}
47
48case "$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
69esac
70
71exit $RETVAL
Note: See TracBrowser for help on using the repository browser.