Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 37d2bab7e7eb9122b08a703d1cea3450 > files > 23

stunnel-4.21-2mdv2008.1.x86_64.rpm

#!/bin/sh
# Sample stunnel SysV startup file
# Copyright by Michal Trojnara 2002,2007

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PREFIX=/usr
DAEMON=$PREFIX/bin/stunnel
PIDFILE=$PREFIX/var/stunnel/stunnel.pid

test -f $DAEMON || exit 0

case "$1" in
    start)
        echo -n "Starting universal SSL tunnel: stunnel"
        $DAEMON || echo -n " failed"
        echo "."
        ;;
    stop)
        echo -n "Stopping universal SSL tunnel: stunnel"
        if test -r $PIDFILE; then
            kill `cat $PIDFILE` 2> /dev/null || echo -n " failed"
        else
            echo -n " no PID file"
        fi
        echo "."
        ;;
     restart|force-reload)
        echo "Restarting universal SSL tunnel"
        $0 stop
        sleep 1
        $0 start
        echo "done."
        ;;
    *)
        N=${0##*/}
        N=${N#[SK]??}
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0