fix zerotier luci typo

This commit is contained in:
coolsnowwolf 2018-09-22 17:25:19 +08:00
parent eabe8527c8
commit 1d9f109abf
3 changed files with 11 additions and 7 deletions

View File

@ -10,7 +10,7 @@ LUCI_TITLE:=LuCI for Zerotier
LUCI_DEPENDS:=+zerotier
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -1,14 +1,17 @@
module("luci.controller.zerotier",package.seeall)
function index()
if not nixio.fs.access("/etc/config/zerotier")then
if not nixio.fs.access("/etc/config/zerotier")then
return
end
entry({"admin","services","zerotier"},cbi("zerotier"),_("ZeroTier"),6).dependent=true
entry({"admin","services","zerotier"},cbi("zerotier"),_("ZeroTier"),10).dependent=true
entry({"admin","services","zerotier","status"},call("act_status")).leaf=true
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)
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

View File

@ -23,7 +23,8 @@ DEFAULT_PACKAGES += partx-utils mkf2fs fdisk e2fsprogs wpad kmod-usb-hid \
kmod-ath5k kmod-ath9k kmod-ath9k-htc kmod-ath10k kmod-rt2800-usb kmod-e1000e kmod-igb kmod-igbvf kmod-ixgbe kmod-pcnet32 kmod-tulip kmod-vmxnet3 htop lm-sensors \
autocore automount ath10k-firmware-qca988x brcmfmac-firmware-43602a1-pcie \
alsa-utils kmod-ac97 kmod-sound-hda-core kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-usb-audio \
kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152
kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152 \
luci-app-zerotier luci-app-v2ray-pro
$(eval $(call BuildTarget))