From e76d9cc7673ffbebd8887bcfc14542c1269288e0 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 5 Jun 2021 09:43:46 +0200 Subject: luci-app-sqm: fix JS error if service is disabled * fix a 'resource not found error' if the sqm service has been disabled and the dir '/var/run/sqm/available_qdiscs' not exist * inform the user about this issue and provide a button to enable & start the service Signed-off-by: Dirk Brenken --- applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json') diff --git a/applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json b/applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json index 2b56b1fc78..13c702449f 100644 --- a/applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json +++ b/applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json @@ -4,7 +4,9 @@ "read": { "file": { "/var/run/sqm/available_qdiscs": [ "list" ], - "/usr/lib/sqm/*.qos.help": [ "read" ] + "/usr/lib/sqm/*.qos.help": [ "read" ], + "/etc/init.d/sqm enable" : [ "exec" ], + "/etc/init.d/sqm start" : [ "exec" ] }, "uci": [ "sqm" ], "ubus": { -- cgit v1.2.3