rest-api: add config dir parametrable.

This commit is contained in:
2018-04-24 22:37:53 +02:00
parent dac1706386
commit a539a82792
4 changed files with 24 additions and 17 deletions

View File

@@ -148,6 +148,9 @@ static int usage(const char *name)
" -l string URL prefix for Lua handler, default is '/lua'\n"
" -L file Lua handler script, omit to disable Lua\n"
#endif
#ifdef HAVE_REST_API_PLUGING
" -U directory Specify the config root path\n"
#endif
#ifdef HAVE_UBUS
" -u string URL prefix for UBUS via JSON-RPC handler\n"
" -U file Override ubus socket path\n"
@@ -441,11 +444,16 @@ int main(int argc, char **argv)
#else
case 'a':
case 'u':
case 'U':
//case 'U':
case 'X':
fprintf(stderr, "uhttpd: UBUS support not compiled, "
"ignoring -%c\n", ch);
break;
#endif
#ifdef HAVE_REST_API_PLUGING
case 'U':
conf.ubus_prefix = optarg;
break;
#endif
default:
return usage(argv[0]);