source: branches/1.0/debian/jobmonarch-jobarchived.init @ 919

Last change on this file since 919 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
RevLine 
[430]1#! /bin/sh
2
[887]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
[430]14PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
[437]15DAEMON=/usr/sbin/jobarchived
[430]16NAME=jobarchived
[437]17DESC="Job Archiving Daemon"
[430]18
[481]19PIDFILE="/var/run/$NAME.pid"
[437]20OPTIONS=""
[430]21
22test -x $DAEMON || exit 0
23
[437]24[ -r /etc/default/$NAME ] && . /etc/default/$NAME
[430]25
26case "$1" in
27  start)
28        echo -n "Starting $DESC: "
[481]29        start-stop-daemon --start --quiet --startas "$DAEMON" --pidfile "$PIDFILE" -- \
30                --pidfile="$PIDFILE" $OPTIONS || { echo "start failed."; exit 0; }
[430]31        echo "$NAME."
[479]32        exit 0
[430]33        ;;
34  stop)
35        echo -n "Stopping $DESC: "
[481]36        start-stop-daemon --stop  --quiet --pidfile "$PIDFILE" \
[479]37                --signal 9 2>&1 > /dev/null || { rm -f "$PIDFILE"; echo "not running."; exit 0; }
[430]38        echo "$NAME."
[437]39        rm -f "$PIDFILE"
40        exit 0
[430]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.