diff --git a/applications/luci-app-wrtbwmon/luasrc/controller/wrtbwmon.lua b/applications/luci-app-wrtbwmon/luasrc/controller/wrtbwmon.lua index 2687e6ad..feee1de9 100644 --- a/applications/luci-app-wrtbwmon/luasrc/controller/wrtbwmon.lua +++ b/applications/luci-app-wrtbwmon/luasrc/controller/wrtbwmon.lua @@ -1,8 +1,11 @@ module("luci.controller.wrtbwmon", package.seeall) function index() + if not nixio.fs.access("/etc/config/wrtbwmon") then + return + end - entry({"admin", "nlbw", "usage"}, alias("admin", "nlbw", "usage", "details"), _("Usage"), 60) + entry({"admin", "nlbw", "usage"}, alias("admin", "nlbw", "usage", "details"), _("Usage"), 60).dependent = true entry({"admin", "nlbw", "usage", "details"}, template("wrtbwmon/wrtbwmon"), _("Details"), 10).leaf = true entry({"admin", "nlbw", "usage", "config"}, cbi("wrtbwmon/config"), _("Configuration"), 20).leaf = true entry({"admin", "nlbw", "usage", "custom"}, form("wrtbwmon/custom"), _("User file"), 30).leaf = true diff --git a/applications/luci-app-wrtbwmon/root/etc/uci-defaults/luci-wrtbwmon b/applications/luci-app-wrtbwmon/root/etc/uci-defaults/luci-wrtbwmon index bcb5b337..28deb786 100755 --- a/applications/luci-app-wrtbwmon/root/etc/uci-defaults/luci-wrtbwmon +++ b/applications/luci-app-wrtbwmon/root/etc/uci-defaults/luci-wrtbwmon @@ -6,7 +6,7 @@ uci -q batch <<-EOF >/dev/null set firewall.wrtbwmon.type=script set firewall.wrtbwmon.path='/etc/wrtbwmon.include' set firewall.wrtbwmon.reload=1 - commit firewall + commit firewall EOF /etc/init.d/wrtbwmon enable