~ubuntu-branches/debian/sid/monopd/sid

« back to all changes in this revision

Viewing changes to debian/monopd.init

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-02-13 18:05:30 UTC
  • Revision ID: james.westby@ubuntu.com-20040213180530-bfrxqf0rzmniuu8d
Tags: 0.9.0-1
* New upstream release.
* Version libcapsinetwork-dev build dependency to 0.2.5 or later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# skeleton      example file to build /etc/init.d/ scripts.
 
4
#               This file should be used to construct scripts for /etc/init.d.
 
5
#
 
6
#               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
 
7
#               Modified for Debian GNU/Linux
 
8
#               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
 
9
#
 
10
# Version:      @(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
 
11
#
 
12
 
 
13
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
14
DAEMON=/usr/sbin/monopd
 
15
NAME=monopd
 
16
DESC=monopd
 
17
 
 
18
test -x $DAEMON || exit 0
 
19
 
 
20
set -e
 
21
 
 
22
case "$1" in
 
23
  start)
 
24
        echo -n "Starting $DESC: "
 
25
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 
26
                --background --make-pidfile --exec \
 
27
                /bin/su nobody -- -c $DAEMON
 
28
        echo "$NAME."
 
29
        ;;
 
30
  stop)
 
31
        echo -n "Stopping $DESC: "
 
32
        start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
 
33
                --oknodo --exec $DAEMON
 
34
        rm -f /var/run/$NAME.pid
 
35
        echo "$NAME."
 
36
        ;;
 
37
  #reload)
 
38
        #
 
39
        #       If the daemon can reload its config files on the fly
 
40
        #       for example by sending it SIGHUP, do it here.
 
41
        #
 
42
        #       If the daemon responds to changes in its config file
 
43
        #       directly anyway, make this a do-nothing entry.
 
44
        #
 
45
        # echo "Reloading $DESC configuration files."
 
46
        # start-stop-daemon --stop --signal 1 --quiet --pidfile \
 
47
        #       /var/run/$NAME.pid --exec $DAEMON
 
48
  #;;
 
49
  restart|force-reload)
 
50
        #
 
51
        #       If the "reload" option is implemented, move the "force-reload"
 
52
        #       option to the "reload" entry above. If not, "force-reload" is
 
53
        #       just the same as "restart".
 
54
        #
 
55
        echo -n "Restarting $DESC: "
 
56
        start-stop-daemon --stop --quiet --pidfile \
 
57
                /var/run/$NAME.pid --oknodo --exec $DAEMON
 
58
        rm -f /var/run/$NAME.pid
 
59
        sleep 1
 
60
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 
61
                --background --make-pidfile --exec \
 
62
                /bin/su nobody -- -c $DAEMON
 
63
        echo "$NAME."
 
64
        ;;
 
65
  *)
 
66
        N=/etc/init.d/$NAME
 
67
        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
 
68
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
 
69
        exit 1
 
70
        ;;
 
71
esac
 
72
 
 
73
exit 0