summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vnstat2/root/usr/share
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-vnstat2/root/usr/share')
-rw-r--r--applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json33
-rw-r--r--applications/luci-app-vnstat2/root/usr/share/rpcd/acl.d/luci-app-vnstat2.json7
2 files changed, 40 insertions, 0 deletions
diff --git a/applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json b/applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json
new file mode 100644
index 0000000000..0b3303c360
--- /dev/null
+++ b/applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json
@@ -0,0 +1,33 @@
+{
+ "admin/status/vnstat2": {
+ "title": "vnStat Traffic Monitor",
+ "order": 90,
+ "action": {
+ "type": "firstchild"
+ },
+ "depends": {
+ "fs": {
+ "/usr/bin/vnstat": "executable",
+ "/usr/bin/vnstati": "executable"
+ }
+ }
+ },
+
+ "admin/status/vnstat2/graphs": {
+ "title": "Graphs",
+ "order": 1,
+ "action": {
+ "type": "view",
+ "path": "vnstat2/graphs"
+ }
+ },
+
+ "admin/status/vnstat2/config": {
+ "title": "Configuration",
+ "order": 2,
+ "action": {
+ "type": "view",
+ "path": "vnstat2/config"
+ }
+ }
+}
diff --git a/applications/luci-app-vnstat2/root/usr/share/rpcd/acl.d/luci-app-vnstat2.json b/applications/luci-app-vnstat2/root/usr/share/rpcd/acl.d/luci-app-vnstat2.json
index 58a2aa50c6..fb16f09c9a 100644
--- a/applications/luci-app-vnstat2/root/usr/share/rpcd/acl.d/luci-app-vnstat2.json
+++ b/applications/luci-app-vnstat2/root/usr/share/rpcd/acl.d/luci-app-vnstat2.json
@@ -1,6 +1,13 @@
{
"luci-app-vnstat2": {
"description": "Grant access to LuCI app vnstat2",
+ "read": {
+ "cgi-io": [ "exec" ],
+ "file": {
+ "/usr/bin/vnstat --json f 1": [ "exec" ],
+ "/usr/bin/vnstati -[5dhmsty] -i * -o -": [ "exec" ]
+ }
+ },
"write": {
"file": {
"/usr/bin/vnstat": [ "exec" ]