3e06b9965f
- Convert to new options framework PR: ports/170917 [1] Submitted by: Denis Zaika <i@doct.org.ua> [1]
36 lines
771 B
Bash
36 lines
771 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: udpxy
|
|
# REQUIRE: DAEMON
|
|
|
|
# Define these udpxy_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
# /etc/rc.conf.d/udpxy
|
|
#
|
|
# udpxy_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable udpxy.
|
|
# udpxy_port (number): Set to "4022" by default.
|
|
# Set listening port number.
|
|
# udpxy_flags (str): Set to "-S" by default.
|
|
# Extra flags passed to start command.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="udpxy"
|
|
rcvar=udpxy_enable
|
|
|
|
load_rc_config ${name}
|
|
|
|
udpxy_enable=${udpxy_enable-"NO"}
|
|
udpxy_port=${udpxy_port-"4022"}
|
|
udpxy_flags=${udpxy_flags-"-S"}
|
|
|
|
command="%%PREFIX%%/sbin/${name}"
|
|
pidfile="/var/run/${name}${udpxy_port}.pid"
|
|
udpxy_flags="-p ${udpxy_port} ${udpxy_flags}"
|
|
|
|
run_rc_command "$1"
|