blob: 12da7b95b76b871ae7ddbe3717d3383494c5a713 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/sh
# PROVIDE: redir
# REQUIRE: DAEMON
#
# Add the following lines to /etc/rc.conf to enable redir:
#
# redir_enable (bool): Set it to "YES" to enable redir.
# Default is "NO".
# redir_flags (flags): Set flags to redir.
# Default is "". see redir(1).
# Example: "--lport=80 --cport=3128 --syslog"
#
. /etc/rc.subr
name="redir"
rcvar=redir_enable
load_rc_config $name
: ${redir_enable="NO"}
command=%%PREFIX%%/bin/redir
command_args="&"
start_precmd="${name}_flags_check"
redir_flags_check()
{
if [ "${redir_flags}" = "" ]; then
err 1 "\$redir_flags are required. see available options in redir(1)"
fi
}
run_rc_command "$1"
|