diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2012-11-18 16:33:31 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2012-11-18 16:33:31 +0000 |
commit | f81193cbbfbd47aa2604b8031b0f7f599445ac20 (patch) | |
tree | 1ffb9d9fff08f721f8e673e137d247bc6e798adc /www/shellinabox/files | |
parent | 36ecb8f48195ff40a7717440c1b733cfc18f1ed9 (diff) | |
download | ports-f81193cbbfbd47aa2604b8031b0f7f599445ac20.tar.gz ports-f81193cbbfbd47aa2604b8031b0f7f599445ac20.zip |
Notes
Diffstat (limited to 'www/shellinabox/files')
-rw-r--r-- | www/shellinabox/files/shellinaboxd.in | 13 |
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"} |