~ubuntu-branches/ubuntu/oneiric/jabberd2/oneiric-security

« back to all changes in this revision

Viewing changes to debian/component.d/20resolver

  • Committer: Bazaar Package Importer
  • Author(s): Nicolai Spohrer
  • Date: 2008-08-12 16:13:43 UTC
  • mfrom: (1.1.3 upstream) (0.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20080812161343-6trz3r97dtevxd17
Tags: 2.2.1-1ubuntu1
* Merge with Debian unstable (LP: #257130), remaining changes:
  - debian/control:
    + Modify Maintainer field as per spec
    + Depend on libdb4.6-dev instead of libdb4.4-dev
    + Added Conflicts and Replaces: ..., jabber for jabberd2
  - debian/rules: Added libtoolize call (jabberd2 ships with
     an older ltmain.sh version that conflicts with the
     current libtool version)
  - debian/init: create /var/run/jabber directory with correct
     permissions
* Dropped changes:
  - Debian already depends on libpq-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
NAME=resolver
3
 
COMMAND=/usr/sbin/jabberd2-${NAME}
4
 
PIDFILE=/var/run/jabberd2/${NAME}.pid
5
 
CONFFILE=/etc/jabberd2/${NAME}.xml
6
 
USER=jabber
7
 
GROUP=adm
8
 
RUN=1
9
 
 
10
 
set -e
11
 
 
12
 
# exit now if we are not ment to run.
13
 
test "${RUN}" != 0 || exit 0
14
 
 
15
 
# check for executable
16
 
test -f ${COMMAND} || exit 0
17
 
 
18
 
case "$1" in
19
 
   start)
20
 
           echo -n " ${NAME}"
21
 
      if [ ! `pidof ${COMMAND}` ]; then
22
 
           start-stop-daemon -b -c ${USER}:${GROUP} \
23
 
            --start --pidfile ${PIDFILE} --quiet \
24
 
            --exec ${COMMAND} -- -c ${CONFFILE} || echo -n "<Failed>"
25
 
      fi
26
 
        ;;
27
 
   stop)
28
 
           echo -n " ${NAME}"
29
 
      start-stop-daemon -o -u ${USER} --stop --quiet \
30
 
         --signal 15 --retry 3 --pidfile ${PIDFILE} \
31
 
         --exec ${COMMAND} || echo -n "<Failed>"
32
 
        ;;
33
 
   restart)
34
 
      $0 stop
35
 
      sleep 1
36
 
      $0 start
37
 
   ;;
38
 
   *)
39
 
      echo "`basename $0` called with unknown option {$1}"
40
 
      exit 1
41
 
   ;;
42
 
esac
43
 
 
44
 
exit 0