parent
72048a713c
commit
251d5c0941
@ -41,12 +41,12 @@ fi
|
|||||||
\`\`\`json
|
\`\`\`json
|
||||||
`
|
`
|
||||||
ucode -S -e '
|
ucode -S -e '
|
||||||
import { connect } from "ubus";
|
import { cursor } from "uci";
|
||||||
const ubus = connect();
|
const uci = cursor();
|
||||||
const config = ubus.call("uci", "get", { "config": "nikki" });
|
const config = uci.get_all("nikki");
|
||||||
const result = {};
|
const result = {};
|
||||||
for (let section_id in config.values) {
|
for (let section_id in config) {
|
||||||
const section = config.values[section_id];
|
const section = config[section_id];
|
||||||
const section_type = section[".type"];
|
const section_type = section[".type"];
|
||||||
if (result[section_type] == null) {
|
if (result[section_type] == null) {
|
||||||
result[section_type] = [];
|
result[section_type] = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user