diff options
Diffstat (limited to 'security/barnyard/files/barnyard.sh')
-rw-r--r-- | security/barnyard/files/barnyard.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/security/barnyard/files/barnyard.sh b/security/barnyard/files/barnyard.sh new file mode 100644 index 000000000000..0f295bea90e9 --- /dev/null +++ b/security/barnyard/files/barnyard.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# + +# PROVIDE: barnyard +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# Add the following lines to /etc/rc.conf to enable barnyard: +# barnyard_enable (bool): Set to YES to enable barnyard +# Default: NO +# barnyard_flags (str): Extra flags passed to barnyard +# Default: -D +# barnyard_conf (str): Barnyard configuration file +# Default: ${PREFIX}/etc/barnyard.conf +# + +. %%RC_SUBR%% + +name="barnyard" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/barnyard" + +load_rc_config $name + +[ -z "$barnyard_enable" ] && barnyard_enable="NO" +[ -z "$barnyard_conf" ] && barnyard_conf="%%PREFIX%%/etc/barnyard.conf" +[ -z "$barnyard_flags" ] && barnyard_flags="-D" + +[ -n "$barnyard_conf" ] && barnyard_flags="$barnyard_flags -c $barnyard_conf" + +run_rc_command "$1" |