source: branches/1.1/debian/jobmonarch-jobarchived.init @ 923

Last change on this file since 923 was 919, checked in by ramonb, 11 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:             jobarchived
5# Required-Start:       $local_fs $remote_fs $network $time postgresql jobmond
6# Required-Stop:        $local_fs $remote_fs $network $time postgresql jobmond
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 Archiving Daemon
12### END INIT INFO
13
14PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15DAEMON=/usr/sbin/jobarchived
16NAME=jobarchived
17DESC="Job Archiving Daemon"
18
19PIDFILE="/var/run/$NAME.pid"
20OPTIONS=""
21
22test -x $DAEMON || exit 0
23
24[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25
26case "$1" in
27  start)
28        echo -n "Starting $DESC: "
29        start-stop-daemon --start --quiet --startas "$DAEMON" --pidfile "$PIDFILE" -- \
30                --pidfile="$PIDFILE" $OPTIONS || { echo "start failed."; exit 0; }
31        echo "$NAME."
32        exit 0
33        ;;
34  stop)
35        echo -n "Stopping $DESC: "
36        start-stop-daemon --stop  --quiet --pidfile "$PIDFILE" \
37                --signal 9 2>&1 > /dev/null || { rm -f "$PIDFILE"; echo "not running."; exit 0; }
38        echo "$NAME."
39        rm -f "$PIDFILE"
40        exit 0
41        ;;
42  restart|force-reload)
43        $0 stop
44        $0 start
45        ;;
46  *)
47        echo "Usage: $N {start|stop|restart}" >&2
48        exit 1
49        ;;
50esac
51
52exit 0
Note: See TracBrowser for help on using the repository browser.