| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# $FreeBSD$ |
| 4 |
# |
| 5 |
|
| 6 |
# PROVIDE: stubby |
| 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 stubby: |
| 13 |
# stubby_enable (bool): Set to "NO" by default. |
| 14 |
# Set it to "YES" to enable stubby. |
| 15 |
# stubby_config (str): Default "%%PREFIX%%/etc/stubby.conf" |
| 16 |
# Set it to the full path to the config file |
| 17 |
# that stubby will use during the automated |
| 18 |
# start-up. |
| 19 |
|
| 20 |
. /etc/rc.subr |
| 21 |
|
| 22 |
name="stubby" |
| 23 |
rcvar=stubby_enable |
| 24 |
|
| 25 |
load_rc_config $name |
| 26 |
|
| 27 |
: ${stubby_enable="NO"} |
| 28 |
: ${stubby_config="%%PREFIX%%/etc/stubby/stubby.yml"} |
| 29 |
|
| 30 |
command="%%PREFIX%%/bin/stubby" |
| 31 |
command_args="-g -C ${stubby_config}" |
| 32 |
|
| 33 |
required_files=${stubby_config} |
| 34 |
run_rc_command "$1" |