summaryrefslogtreecommitdiffstats
path: root/applications/luci-app-example/root/etc/uci-defaults/80_example
blob: 52b70ab42322121dabf51244861a626094aef615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

touch /etc/config/example
uci set example.first=first
uci set example.second=second
uci set example.third=third
uci set example.animals=animals
uci set example.animals.num_cats=1
uci set example.animals.num_dogs=2
uci set example.animals.num_parakeets=4
uci commit example

# Sample data for the file-backed JSONMap example (file-jsonmap.js)
[ -f /etc/example.json ] || cat > /etc/example.json <<EOF
{
	"animals": { "num_cats": 1, "num_dogs": 2 },
	"pets": [ { "name": "Polly", "species": "parakeet" } ]
}
EOF

return 0