~ubuntu-branches/ubuntu/utopic/binkd/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/init

  • Committer: Bazaar Package Importer
  • Author(s): Marco d'Itri
  • Date: 2002-03-24 22:52:25 UTC
  • Revision ID: james.westby@ubuntu.com-20020324225225-emwdv21tqzdb21le
Tags: 0.9.5a-4
Fixed ftrans (Closes: #139055).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
OPTS="/etc/binkd/binkd.cfg -q"
 
4
PIDFILE=/var/run/ftn/binkd.pid
 
5
DAEMON=/usr/sbin/binkd
 
6
 
 
7
test -f $DAEMON || exit 0
 
8
 
 
9
# don't start binkd if it is started by inetd
 
10
grep -q ^binkp /etc/inetd.conf && exit 0
 
11
 
 
12
case "$1" in
 
13
  start)
 
14
    echo -n "Starting FTN mailer: binkd"
 
15
    start-stop-daemon --start --background --pidfile $PIDFILE \
 
16
        --chuid ftn:ftn --exec $DAEMON -- $OPTS
 
17
    echo "."
 
18
    ;;
 
19
  stop)
 
20
    echo -n "Stopping FTN mailer: binkd"
 
21
    start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON
 
22
    echo "."
 
23
    ;;
 
24
  reload)
 
25
    echo -n "Reloading FTN mailer: binkd"
 
26
    start-stop-daemon --stop --signal 1 --pidfile $PIDFILE --exec $DAEMON
 
27
    echo "."
 
28
    ;;
 
29
  restart|force-reload)
 
30
    sh $0 stop
 
31
    sleep 1
 
32
    sh $0 start
 
33
    ;;
 
34
  *)
 
35
    echo "Usage: /etc/init.d/binkd {start|stop|restart|reload|force-reload}"
 
36
    exit 1
 
37
    ;;
 
38
esac
 
39
 
 
40
exit 0