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_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
24 msg_network_down stunnel
31 # Daemon doesn't die if config doesn't exist
32 if [ ! -f "$STUNNEL_CONFIG" ]; then
33 nls "%s config %s does not exist." Stunnel "$STUNNEL_CONFIG"
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/stunnel ]; then
40 msg_starting stunnel; busy
41 daemon stunnel $STUNNEL_CONFIG
43 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/stunnel
45 msg_already_running stunnel
50 if [ -f /var/lock/subsys/stunnel ]; then
53 rm -f /var/run/stunnel/stunnel.pid /var/lock/subsys/stunnel >/dev/null 2>&1
55 msg_not_running stunnel
60 if [ -f /var/lock/subsys/stunnel ]; then
64 msg_not_running stunnel
70 # See how we were called.
93 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"