Lines 1-41
Link Here
|
1 |
#!/bin/sh |
|
|
2 |
# |
3 |
# $FreeBSD: ports/security/stunnel/files/stunnel.sh,v 1.7 2007/10/29 16:45:19 roam Exp $ |
4 |
# |
5 |
|
6 |
# PROVIDE: stunnel |
7 |
# REQUIRE: NETWORKING SERVERS |
8 |
# BEFORE: DAEMON |
9 |
# KEYWORD: shutdown |
10 |
|
11 |
# |
12 |
# Add some of the following variables to /etc/rc.conf to configure stunnel: |
13 |
# stunnel_enable (bool): Set to "NO" by default. |
14 |
# Set it to "YES" to enable stunnel. |
15 |
# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf" |
16 |
# Set it to the full path to the config file |
17 |
# that stunnel will use during the automated |
18 |
# start-up. |
19 |
# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid" |
20 |
# Set it to the value of 'pid' in |
21 |
# the stunnel.conf file. |
22 |
# |
23 |
|
24 |
. !!RC_SUBR!! |
25 |
|
26 |
name="stunnel" |
27 |
rcvar=`set_rcvar` |
28 |
stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf" |
29 |
stunnel_pidfile="/var/run/${name}.pid" |
30 |
command="!!PREFIX!!/bin/stunnel" |
31 |
|
32 |
[ -z "$stunnel_enable" ] && stunnel_enable="NO" |
33 |
|
34 |
load_rc_config $name |
35 |
|
36 |
command_args=${stunnel_config} |
37 |
pidfile=${stunnel_pidfile} |
38 |
|
39 |
required_files="${stunnel_config}" |
40 |
|
41 |
run_rc_command "$1" |