3 # stunnel stunnel (Universal SSL tunnel)
7 # description: stunnel (Universal SSL tunnel)
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
19 [ -f /etc/sysconfig/stunnel ] && . /etc/sysconfig/stunnel
21 # Check that networking is up.
22 if is_no "${NETWORKING}"; then
23 msg_network_down stunnel
27 # Daemon doesn't die if config doesn't exist
28 if [ ! -f $STUNNEL_CONFIG ]; then
29 echo "Stunnel config $STUNNEL_CONFIG does not exist."
33 # See how we were called.
36 # Check if the service is already running?
37 if [ ! -f /var/lock/subsys/stunnel ]; then
38 msg_starting stunnel; busy
39 daemon stunnel $STUNNEL_CONFIG
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/stunnel
43 msg_already_running stunnel
48 if [ -f /var/lock/subsys/stunnel ]; then
51 rm -f /var/run/stunnel/stunnel.pid /var/lock/subsys/stunnel >/dev/null 2>&1
53 msg_not_running stunnel
66 msg_usage "$0 {start|stop|status|restart}"