summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ttyd/luasrc/controller/ttyd.lua
diff options
context:
space:
mode:
authorRichard Yu <yurichard3839@gmail.com>2019-10-17 16:47:14 +0800
committerRichard Yu <yurichard3839@gmail.com>2019-10-17 17:52:54 +0800
commit1c9a06ea2b8829bee9d4149f118bd8c0d863c081 (patch)
tree88ad11322a7ba6c2cf5a2fd15400cb5c6a6d7b62 /applications/luci-app-ttyd/luasrc/controller/ttyd.lua
parent51b519e55ec7daa62c343e7f776fa5a1bcc3d8bb (diff)
luci-app-ttyd: add new package
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
Diffstat (limited to 'applications/luci-app-ttyd/luasrc/controller/ttyd.lua')
-rw-r--r--applications/luci-app-ttyd/luasrc/controller/ttyd.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/applications/luci-app-ttyd/luasrc/controller/ttyd.lua b/applications/luci-app-ttyd/luasrc/controller/ttyd.lua
new file mode 100644
index 000000000..5a7344d84
--- /dev/null
+++ b/applications/luci-app-ttyd/luasrc/controller/ttyd.lua
@@ -0,0 +1,13 @@
+-- Licensed to the public under the Apache License 2.0.
+
+module("luci.controller.ttyd", package.seeall)
+
+function index()
+ if not nixio.fs.access("/etc/config/ttyd") then
+ return
+ end
+
+ entry({"admin", "services", "ttyd"}, firstchild(), _("ttyd"))
+ entry({"admin", "services", "ttyd", "ttyd"}, view("ttyd/term"), _("Terminal"), 1)
+ entry({"admin", "services", "ttyd", "config"}, view("ttyd/config"), _("Config"), 2)
+end