~ubuntu-branches/ubuntu/karmic/tcpspy/karmic

« back to all changes in this revision

Viewing changes to debian/tcpspy.init

  • Committer: Bazaar Package Importer
  • Author(s): Pablo Lorenzzoni
  • Date: 2002-01-25 00:00:00 UTC
  • Revision ID: james.westby@ubuntu.com-20020125000000-acrs0yl4g2xchacd
Tags: 1.7d-1
* Fixes a crash with an empty ruleset.
* Fixes the split rule problem.
* Fixes the /proc/net/tcp incompatibility problem (Closes: #115613).
* The upstream said that he is out of time to release v2.0, so he'll
  get the 1.x series a little far than originally expected.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# init.d/tcpspy - init script for tcpspy
 
3
#
 
4
# Written by Pablo Lorenzzoni <spectra@debian.org>
 
5
#
 
6
# Last change: 15 Jul 2001
 
7
 
 
8
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
9
DAEMON=/usr/sbin/tcpspy
 
10
NAME=tcpspy
 
11
DESC=tcpspy
 
12
RULESFILE=/etc/tcpspy.rules
 
13
 
 
14
test -f $DAEMON || exit 0
 
15
 
 
16
set -e
 
17
 
 
18
case "$1" in
 
19
  start)
 
20
        echo -n "Starting $DESC: "
 
21
        CMDLINE="start-stop-daemon --start --quiet --chuid nobody --oknodo --exec $DAEMON -- -f $RULESFILE"
 
22
        eval "$CMDLINE"
 
23
        echo "$NAME."
 
24
        ;;
 
25
  stop)
 
26
        echo -n "Stopping $DESC: "
 
27
        start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
 
28
        echo "$NAME."
 
29
        ;;
 
30
  restart|force-reload)
 
31
        echo -n "Restarting $DESC: "
 
32
        start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
 
33
        sleep 1
 
34
        CMDLINE="start-stop-daemon --start --quiet --chuid nobody --oknodo --exec $DAEMON -- -f $RULESFILE"
 
35
        eval "$CMDLINE"
 
36
        echo "$NAME."
 
37
        ;;
 
38
  *)
 
39
        N=/etc/init.d/$NAME
 
40
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
 
41
        exit 1
 
42
        ;;
 
43
esac
 
44
 
 
45
exit 0