~ubuntu-branches/ubuntu/precise/stunnel4/precise-security

« back to all changes in this revision

Viewing changes to tools/stunnel.init

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lemoine
  • Date: 2005-04-20 21:07:50 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050420210750-0vk5fj5vh75o4d00
Tags: 2:4.090-1
* New upstream release
* include better stunnel3 compability script from upstream, options 
  like -cd can now be use instead of -c -d ...
  (closes: #305259)
* Added depends on perl-modules to allow use of stunnel3 compatibilty script

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Sample stunnel SysV startup file
3
 
# Copyright by Michal Trojnara 2002
4
 
 
5
 
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
6
 
PREFIX=/usr
7
 
DAEMON=$PREFIX/sbin/stunnel
8
 
PIDFILE=$PREFIX/var/run/stunnel/stunnel.pid
9
 
 
10
 
test -f $DAEMON || exit 0
11
 
 
12
 
case "$1" in
13
 
    start)
14
 
        echo -n "Starting universal SSL tunnel: stunnel"
15
 
        $DAEMON || echo -n " failed"
16
 
        echo "."
17
 
        ;;
18
 
    stop)
19
 
        echo -n "Stopping universal SSL tunnel: stunnel"
20
 
        if test -r $PIDFILE; then
21
 
            kill `cat $PIDFILE` 2> /dev/null || echo -n " failed"
22
 
        else
23
 
            echo -n " no PID file"
24
 
        fi
25
 
        echo "."
26
 
        ;;
27
 
     restart|force-reload)
28
 
        echo "Restarting universal SSL tunnel"
29
 
        $0 stop
30
 
        sleep 1
31
 
        $0 start
32
 
        echo "done."
33
 
        ;;
34
 
    *)
35
 
        N=${0##*/}
36
 
        N=${N#[SK]??}
37
 
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
38
 
        exit 1
39
 
        ;;
40
 
esac
41
 
 
42
 
exit 0
43