Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
projects
:
network
>
stunnel
> stunnel.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File stunnel.init of Package stunnel
#!/bin/bash # # stunnel SSL encryption wrapper # # chkconfig: 345 80 30 # description: Postfix is a Mail Transport Agent, which is the program \ # that moves mail from one machine to another. # processname: stunnel # pidfile: /var/run/stunnel/stunnel.pid # config: /etc/stunnel/stunnel.con # description: secure tunnel daemon # ### BEGIN INIT INFO # Provides: stunnel # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop stunnel # Description: Stunnel is SSL encryption wrapper, and is commonly used to # add SSL functionality to other daemons without any changes # in their programs' code. ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions RETVAL=0 prog="stunnel" exec=/usr/bin/$prog lockfile=/var/lock/subsys/$prog pidfile=/var/run/stunnel/stunnel.pid CONFIG="/etc/stunnel/stunnel.conf" # Source stunnel configuration. if [ -f /etc/sysconfig/stunnel ] ; then . /etc/sysconfig/stunnel fi start() { [ -x "$exec" ] || exit 5 echo -n $"Starting secure tunnel: " daemon $exec $CONFIG RETVAL=$? [ "$RETVAL" -eq 0 ] && touch "$lockfile" echo return $RETVAL } stop() { echo -n $"Stopping secure tunnel: " killproc -p $pidfile $prog RETVAL=$? [ "$RETVAL" -eq 0 ] && rm -f "$lockfile" echo return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start|stop|restart) $1 ;; reload|force-reload) restart ;; condrestart|try-restart) [ ! -f "$lockfile" ] || restart ;; status) status $prog ;; *) echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|status}" exit 2 esac exit $?