You might need to modify some settings to suite your installation. I installed from source.
whereis stunnel (might need to ln -s /usr/local/bin/stunnel /usr/sbin/stunnel) vi /etc/init.d/stunnel
# processname: stunnel
# config: /etc/stunnel/stunnel.conf
# pidfile: /var/run/stunnel/stunnel.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source stunnel configureation.
if [ -f /etc/sysconfig/stunnel ] ; then
. /etc/sysconfig/stunnel
fi
RETVAL=0
prog=”stunnel”
start() {
# Start daemons.
echo -n $”Starting $prog: ”
if test -x /usr/sbin/stunnel ; then
/usr/sbin/stunnel /etc/stunnel/stunnel.conf
fi
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/stunnel
return $RETVAL
}
stop() {
# Stop daemons.
echo -n $”Shutting down $prog: ”
killproc stunnel
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/stunnel
return $RETVAL
}
# See how we were called.
case “$1″ in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/stunnel ]; then
stop
start
RETVAL=$?
fi
;;
status)
status stunnel
RETVAL=$?
;;
*)
echo $”Usage: $0 {start|stop|restart|condrestart|status}”
exit 1
esac
exit $RETVAL
Leave a Reply