27c6a7f09c
While I'm here, pick up various changes from PR's: - convert the startup script to the new style[2], but do not yet enable USE_RC_SUBR; a repo-copy of stunnel.sh to stunnel.in should be done first - use ETCDIR instead of PREFIX/etc/stunnel everywhere[3] - wave a magic wand over the startup script generation process to mimic the changes that will be done by USE_RC_SUBR after the repo-copy Prompted by: Damian Wiest <dwiest@vailsys.com> and Luis Rodrigo Gallardo Cruz <rodrigo@nul-unu.com> on the stunnel-users mailing list [1] PR: 119655 [2] - only the changes to the startup script 116773 [3] - only the ETCDIR part Submitted by: Jason DiCioccio <jd@ods.org> [2], Alexander Logvinov <ports@logvinov.com> [3]
41 lines
924 B
Bash
41 lines
924 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: stunnel
|
|
# REQUIRE: NETWORKING SERVERS
|
|
# BEFORE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add some of the following variables to /etc/rc.conf to configure stunnel:
|
|
# stunnel_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable stunnel.
|
|
# stunnel_config (str): Default "%%ETCDIR%%/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 'pid' in
|
|
# the stunnel.conf file.
|
|
#
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name="stunnel"
|
|
rcvar=`set_rcvar`
|
|
|
|
load_rc_config $name
|
|
|
|
: ${stunnel_enable="NO"}
|
|
: ${stunnel_config="%%ETCDIR%%/${name}.conf"}
|
|
: ${stunnel_pidfile="/var/run/${name}.pid"}
|
|
|
|
command="%%PREFIX%%/bin/stunnel"
|
|
command_args=${stunnel_config}
|
|
pidfile=${stunnel_pidfile}
|
|
|
|
required_files="${stunnel_config}"
|
|
|
|
run_rc_command "$1"
|