diff options
Diffstat (limited to 'security/stunnel/files/stunnel.in')
-rw-r--r-- | security/stunnel/files/stunnel.in | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/security/stunnel/files/stunnel.in b/security/stunnel/files/stunnel.in index 8edeb0c175dc..23059f7e72a4 100644 --- a/security/stunnel/files/stunnel.in +++ b/security/stunnel/files/stunnel.in @@ -1,25 +1,41 @@ #!/bin/sh # -# A sample stunnel startup script written by martti.kuparinen@ericsson.com -# # $FreeBSD$ # -# Where is the program -STUNNEL="!!PREFIX!!/sbin/stunnel" +# PROVIDE: stunnel +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable mysql: +# stunnel_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable stunnel. +# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf" +# Set it to the full path to the config file +# that stunnel will use during the automated +# start-up. +# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid" +# Set it to the value of 'pidfile' in +# the stunnel.conf file. +# + +. !!RC_SUBR!! + +name="stunnel" +rcvar=`set_rcvar` +stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf" +stunnel_pidfile="!!PREFIX!!/var/stunnel/${name}.pid" +command="!!PREFIX!!/sbin/stunnel" + +[ -z "$stunnel_enable" ] && stunnel_enable="NO" + +load_rc_config $name -case "$1" in - start) - ${STUNNEL} !!PREFIX!!/etc/stunnel/stunnel.conf - ;; +command_args=${stunnel_config} +pidfile=${stunnel_pidfile} - stop) - killall `basename ${STUNNEL}` - ;; +required_files="${stunnel_config}" - *) - echo "" - echo "Usage: `basename $0` { start | stop }" - echo "" - ;; -esac +run_rc_command "$1" |