aboutsummaryrefslogtreecommitdiff
path: root/www/shellinabox/files
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2012-11-18 16:33:31 +0000
committerHiroki Sato <hrs@FreeBSD.org>2012-11-18 16:33:31 +0000
commitf81193cbbfbd47aa2604b8031b0f7f599445ac20 (patch)
tree1ffb9d9fff08f721f8e673e137d247bc6e798adc /www/shellinabox/files
parent36ecb8f48195ff40a7717440c1b733cfc18f1ed9 (diff)
downloadports-f81193cbbfbd47aa2604b8031b0f7f599445ac20.tar.gz
ports-f81193cbbfbd47aa2604b8031b0f7f599445ac20.zip
Notes
Diffstat (limited to 'www/shellinabox/files')
-rw-r--r--www/shellinabox/files/shellinaboxd.in13
1 files changed, 8 insertions, 5 deletions
diff --git a/www/shellinabox/files/shellinaboxd.in b/www/shellinabox/files/shellinaboxd.in
index 1cff58c7ae9a..d1e8c4d9a4dd 100644
--- a/www/shellinabox/files/shellinaboxd.in
+++ b/www/shellinabox/files/shellinaboxd.in
@@ -14,7 +14,6 @@
# shellinaboxd_enable="YES"
#
# You can fine tune others variables too:
-# shellinaboxd_fib="NONE"
# shellinaboxd_pidfile="/var/run/shellinabox.pid"
# shellinaboxd_user="%%USERS%%"
# shellinaboxd_group="%%GROUPS%%"
@@ -24,9 +23,14 @@
# Example: shellinaboxd_certfile="/your/cert.pem"
# shellinaboxd_flags=
-shellinaboxd_setfib() {
- sysctl net.fibs >/dev/null 2>&1 || return 0
+shellinaboxd_precmd() {
+ if command -v check_namevarlist > /dev/null 2>&1; then
+ check_namevarlist fib && return 0
+ fi
+ ${SYSCTL} net.fibs >/dev/null 2>&1 || return 0
+
+ shellinaboxd_fib=${shellinaboxd_fib:-"NONE"}
case "$shellinaboxd_fib" in
[Nn][Oo][Nn][Ee])
;;
@@ -42,12 +46,11 @@ name="shellinaboxd"
rcvar=shellinaboxd_enable
command="%%PREFIX%%/bin/${name}"
-start_precmd="shellinaboxd_setfib"
+start_precmd="shellinaboxd_precmd"
load_rc_config $name
shellinaboxd_enable=${shellinaboxd_enable:-"NO"}
-shellinaboxd_fib=${shellinaboxd_fib:-"NONE"}
shellinaboxd_user=${shellinaboxd_user:-"%%USERS%%"}
shellinaboxd_group=${shellinaboxd_group:-"%%GROUPS%%"}
shellinaboxd_port=${shellinaboxd_port:-"4200"}