mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 16:29:15 -04:00
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
37 lines
667 B
Bash
37 lines
667 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# 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"
|