uhttpd: don't process ubus_* and lua_* options if corresponding plugin is not installed (#14618)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39057 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
Jo-Philipp Wich 2013-12-15 15:32:37 +00:00
parent c89198646e
commit c5340d1dbf

View File

@ -67,10 +67,14 @@ start_instance()
append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
append_arg "$cfg" config "-c"
append_arg "$cfg" cgi_prefix "-x"
append_arg "$cfg" lua_prefix "-l"
append_arg "$cfg" lua_handler "-L"
append_arg "$cfg" ubus_prefix "-u"
append_arg "$cfg" ubus_socket "-U"
[ -f /usr/lib/uhttpd_lua.so ] && {
append_arg "$cfg" lua_prefix "-l"
append_arg "$cfg" lua_handler "-L"
}
[ -f /usr/lib/uhttpd_ubus.so ] && {
append_arg "$cfg" ubus_prefix "-u"
append_arg "$cfg" ubus_socket "-U"
}
append_arg "$cfg" script_timeout "-t"
append_arg "$cfg" network_timeout "-T"
append_arg "$cfg" http_keepalive "-k"