From dca92b8768b767d3b526b8a9d5117fc57c6bd9c1 Mon Sep 17 00:00:00 2001
From: suyuan <175338101@qq.com>
Date: Fri, 28 Jul 2023 14:44:30 +0800
Subject: [PATCH] fix
---
.../luasrc/controller/zerotier.lua | 24 ----
.../luasrc/model/cbi/zerotier/info.lua | 15 ---
.../luasrc/model/cbi/zerotier/manual.lua | 26 ----
.../luasrc/model/cbi/zerotier/settings.lua | 37 ------
.../luasrc/view/zerotier/zerotier_status.htm | 29 -----
luci-app-zerotier/po/zh-cn/zerotier.po | 35 ------
luci-app-zerotier/po/zh_Hans | 1 -
luci-app-zerotier/root/etc/init.d/zerotier | 113 ------------------
luci-app-zerotier/root/etc/zerotier.start | 28 -----
luci-app-zerotier/root/etc/zerotier.stop | 15 ---
.../root/etc/zerotier/zerotier.log | 0
11 files changed, 323 deletions(-)
delete mode 100755 luci-app-zerotier/luasrc/controller/zerotier.lua
delete mode 100755 luci-app-zerotier/luasrc/model/cbi/zerotier/info.lua
delete mode 100755 luci-app-zerotier/luasrc/model/cbi/zerotier/manual.lua
delete mode 100755 luci-app-zerotier/luasrc/model/cbi/zerotier/settings.lua
delete mode 100755 luci-app-zerotier/luasrc/view/zerotier/zerotier_status.htm
delete mode 100755 luci-app-zerotier/po/zh-cn/zerotier.po
delete mode 100755 luci-app-zerotier/po/zh_Hans
delete mode 100755 luci-app-zerotier/root/etc/init.d/zerotier
delete mode 100755 luci-app-zerotier/root/etc/zerotier.start
delete mode 100755 luci-app-zerotier/root/etc/zerotier.stop
delete mode 100755 luci-app-zerotier/root/etc/zerotier/zerotier.log
diff --git a/luci-app-zerotier/luasrc/controller/zerotier.lua b/luci-app-zerotier/luasrc/controller/zerotier.lua
deleted file mode 100755
index f2973c65e..000000000
--- a/luci-app-zerotier/luasrc/controller/zerotier.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-module("luci.controller.zerotier", package.seeall)
-
-function index()
- if not nixio.fs.access("/etc/config/zerotier") then
- return
- end
-
- entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false
-
- entry({"admin", "vpn", "zerotier"}, alias("admin", "vpn", "zerotier", "general"), _("ZeroTier"), 99)
-
- entry({"admin", "vpn", "zerotier", "general"}, cbi("zerotier/settings"), _("Base Setting"), 1)
- entry({"admin", "vpn", "zerotier", "log"}, form("zerotier/info"), _("Interface Info"), 2)
- entry({"admin", "vpn", "zerotier", "manual"}, cbi("zerotier/manual"), _("Manual Config"), 3)
-
- entry({"admin", "vpn", "zerotier", "status"}, call("act_status"))
-end
-
-function act_status()
- local e = {}
- e.running = luci.sys.call("pgrep /usr/bin/zerotier-one >/dev/null") == 0
- luci.http.prepare_content("application/json")
- luci.http.write_json(e)
-end
diff --git a/luci-app-zerotier/luasrc/model/cbi/zerotier/info.lua b/luci-app-zerotier/luasrc/model/cbi/zerotier/info.lua
deleted file mode 100755
index bb8fc3769..000000000
--- a/luci-app-zerotier/luasrc/model/cbi/zerotier/info.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-local fs = require "nixio.fs"
-local conffile = "/tmp/zero.info"
-
-f = SimpleForm("logview")
-
-t = f:field(TextValue, "conf")
-t.rmempty = true
-t.rows = 19
-function t.cfgvalue()
- luci.sys.exec("for i in $(ifconfig | grep 'zt' | awk '{print $1}'); do ifconfig $i; done > /tmp/zero.info")
- return fs.readfile(conffile) or ""
-end
-t.readonly = "readonly"
-
-return f
diff --git a/luci-app-zerotier/luasrc/model/cbi/zerotier/manual.lua b/luci-app-zerotier/luasrc/model/cbi/zerotier/manual.lua
deleted file mode 100755
index 71ae2bb37..000000000
--- a/luci-app-zerotier/luasrc/model/cbi/zerotier/manual.lua
+++ /dev/null
@@ -1,26 +0,0 @@
-local m, s, o
-local fs = require "nixio.fs"
-local jsonc = require "luci.jsonc" or nil
-m = Map("zerotier")
-s = m:section(NamedSection, "sample_config", "zerotier")
-s.anonymous = true
-s.addremove = false
-o = s:option(TextValue, "manualconfig")
-o.rows = 20
-o.wrap = "soft"
-o.rmempty = true
-o.cfgvalue = function(self, section)
- return fs.readfile("/etc/config/zero/local.conf")
-end
-o.write = function(self, section, value)
- fs.writefile("/etc/config/zero/local.conf", value:gsub("\r\n", "\n"))
-end
-o.validate = function(self, value)
- if jsonc == nil or jsonc.parse(value) ~= nil then
- return value
- end
- return nil
-end
-o.description =
- 'https://www.zerotier.com/manual/
https://github.com/zerotier/ZeroTierOne/blob/dev/service/README.md'
-return m
diff --git a/luci-app-zerotier/luasrc/model/cbi/zerotier/settings.lua b/luci-app-zerotier/luasrc/model/cbi/zerotier/settings.lua
deleted file mode 100755
index fc70a8581..000000000
--- a/luci-app-zerotier/luasrc/model/cbi/zerotier/settings.lua
+++ /dev/null
@@ -1,37 +0,0 @@
-a = Map("zerotier")
-a.title = translate("ZeroTier")
-a.description = translate("Zerotier is an open source, cross-platform and easy to use virtual LAN")
-
-a:section(SimpleSection).template = "zerotier/zerotier_status"
-
-t = a:section(NamedSection, "sample_config", "zerotier")
-t.anonymous = true
-t.addremove = false
-
-e = t:option(Flag, "enabled", translate("Enable"))
-e.default = 0
-e.rmempty = false
-
-e = t:option(DynamicList, "join", translate('ZeroTier Network ID'))
-e.password = true
-e.rmempty = false
-
-e = t:option(Flag, "nat", translate("Auto NAT Clients"))
-e.description = translate("Allow zerotier clients access your LAN network")
-e.default = 0
-e.rmempty = false
-
-e = t:option(MultiValue, "access", translate("Zerotier Access Control"))
-e.default = "lanfwzt ztfwwan ztfwlan"
-e.rmempty = false
-e:value("lanfwzt", translate("LAN Access Zerotier"))
-e:value("wanfwzt", translate("WAN Access Zerotier"))
-e:value("ztfwwan", translate("Remote Access WAN"))
-e:value("ztfwlan", translate("Remote Access LAN"))
-e.widget = "checkbox"
-
-e = t:option(DummyValue, "opennewwindow", translate(
- ""))
-e.description = translate("Create or manage your zerotier network, and auth clients who could access")
-
-return a
diff --git a/luci-app-zerotier/luasrc/view/zerotier/zerotier_status.htm b/luci-app-zerotier/luasrc/view/zerotier/zerotier_status.htm
deleted file mode 100755
index b2faf8e44..000000000
--- a/luci-app-zerotier/luasrc/view/zerotier/zerotier_status.htm
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-