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