~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/etc/init.d/dsc-statistics-presenter

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#
3
 
# Written by Hugo Haas <hugo@debian.org> for ippl.
4
 
# Modified by Marc Haber <mh+debian-packages@zugschlus.de>.
5
 
# Adapted for dsc-collector by Marc Haber <mh+debian-packages@zugschlus.de>
6
 
 
7
 
### BEGIN INIT INFO
8
 
# Provides:          dsc-statistics-presenter
9
 
# Required-Start:    $local_fs $remote_fs
10
 
# Required-Stop:     $local_fs $remote_fs
11
 
# Should-Start:
12
 
# Should-Stop:
13
 
# Default-Start:     2 3 4 5
14
 
# Default-Stop:      0 1 6
15
 
# Short-Description: dsc-statistics-presenter
16
 
# Description:       A DNS Statistics Collector - Presenter component
17
 
### END INIT INFO
18
 
 
19
 
set -e
20
 
 
21
 
if ! [ -x "/lib/lsb/init-functions" ]; then
22
 
  . /lib/lsb/init-functions
23
 
else
24
 
  echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
25
 
  exit 1
26
 
fi
27
 
 
28
 
if [ -n "$DSCDEBUG" ]; then
29
 
  echo "now debugging $0 $@"
30
 
  set -x
31
 
fi
32
 
 
33
 
LANG=C
34
 
export LANG
35
 
 
36
 
NAME="dsc-presenter"
37
 
DESC="DNS Statistics Presenter"
38
 
 
39
 
start() {
40
 
  log_daemon_msg "Starting $DESC" "$NAME"
41
 
 
42
 
  lRUNDIR="/var/run/dsc-statistics-presenter"
43
 
 
44
 
  [ -e $lRUNDIR ] || mkdir -p $lRUNDIR
45
 
  chown Debian-dsc-statistics $lRUNDIR
46
 
  ret=$?
47
 
 
48
 
  log_end_msg $ret
49
 
 
50
 
  return $ret
51
 
}
52
 
 
53
 
case "$1" in
54
 
  start)
55
 
    start
56
 
    ;;
57
 
  stop)
58
 
    ;;
59
 
  restart|force-reload)
60
 
    start
61
 
    ;;
62
 
  status)
63
 
    ;;
64
 
  *)
65
 
    log_failure_msg "Usage: $0 {start|restart|force-reload}" >&2
66
 
    exit 1
67
 
    ;;
68
 
esac
69
 
 
70
 
exit 0