source: branches/1.1/debian/jobmonarch-jobmond.init @ 951

Last change on this file since 951 was 919, checked in by ramonb, 8 years ago

Makefile:

  • removed install of Debian init.d, default file
  • first install .conf files and make sure DESTDIR/etc exists

debian/rules:

  • set DESTDIR as variable for all other dh_ calls
  • no longer need to override dh_install

pkg/deb/default/jobmond -> debian/jobmonarch-jobmond.default : moved
pkg/deb/init.d/jobmond -> debian/jobmonarch-jobmond.init : moved
pkg/deb/default/jobarchived -> debian/jobmonarch-jobarchived.default : moved
pkg/deb/init.d/jobarchived -> debian/jobmonarch-jobarchived.init : moved

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides:             jobmond
5# Required-Start:       $local_fs $remote_fs $network $time
6# Required-Stop:        $local_fs $remote_fs $network $time
7# Should-Start:         $syslog
8# Should-Stop:          $syslog
9# Default-Start:        2 3 4 5
10# Default-Stop:         0 1 6
11# Short-Description:    Job Monitor Daemon
12### END INIT INFO
13
14PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15DAEMON=/usr/sbin/jobmond
16NAME=jobmond
17DESC="Job Monitor Daemon"
18
19PIDFILE="/var/run/$NAME.pid"
20
21test -x $DAEMON || return 0
22
23OPTIONS=""
24
25[ -r /etc/default/$NAME ] && . /etc/default/$NAME
26
27case "$1" in
28  start)
29        echo -n "Starting $DESC: "
30        start-stop-daemon --start --quiet --startas "$DAEMON" --pidfile "$PIDFILE" -- \
31                --pidfile="$PIDFILE" $OPTIONS || { echo "start failed."; exit 0; }
32        echo "$NAME."
33        exit 0
34        ;;
35  stop)
36        echo -n "Stopping $DESC: "
37        start-stop-daemon --stop --quiet --pidfile "$PIDFILE" \
38                --signal 9 2>&1 > /dev/null || { rm -f "$PIDFILE"; echo "not running."; exit 0; }
39        echo "$NAME."
40        rm -f "$PIDFILE"
41        exit 0
42        ;;
43  restart|force-reload)
44        $0 stop
45        $0 start
46        ;;
47  *)
48        echo "Usage: $N {start|stop|restart}" >&2
49        exit 1
50        ;;
51esac
52
53exit 0
Note: See TracBrowser for help on using the repository browser.