mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 13:27:36 +08:00
update 2022-12-28 20:17:27
This commit is contained in:
parent
0b641a87ae
commit
467b058a37
@ -1,43 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bpytop
|
||||
PKG_VERSION:=1.0.68
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PYPI_NAME:=bpytop
|
||||
PKG_HASH:=53b66788e8d7c7abbab43c6275fa1c3b2316e56e46f7a093f2f4dfb397549bb2
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
|
||||
|
||||
define Package/bpytop
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
TITLE:=Python port of bashtop
|
||||
URL:=https://github.com/aristocratos/bpytop
|
||||
DEPENDS:=+python3-psutil +python3-setuptools
|
||||
endef
|
||||
|
||||
define Package/bpytop/description
|
||||
Resource monitor that shows usage and stats for
|
||||
processor, memory, disks, network and processes.
|
||||
endef
|
||||
|
||||
define Py3Package/bpytop/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bpytop $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/share/bpytop
|
||||
$(CP) $(PKG_BUILD_DIR)/themes $(1)/usr/share/bpytop/
|
||||
endef
|
||||
|
||||
$(eval $(call Py3Package,bpytop))
|
||||
$(eval $(call BuildPackage,bpytop))
|
||||
$(eval $(call BuildPackage,bpytop-src))
|
@ -1,32 +0,0 @@
|
||||
--- a/bpytop.py
|
||||
+++ b/bpytop.py
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
import os, sys, io, threading, signal, re, subprocess, logging, logging.handlers, argparse
|
||||
import urllib.request
|
||||
-from time import time, sleep, strftime, tzset
|
||||
+from time import time, sleep, strftime
|
||||
from datetime import timedelta
|
||||
from _thread import interrupt_main
|
||||
from collections import defaultdict
|
||||
@@ -37,6 +37,11 @@ except Exception as e: errors.append(f'{e}')
|
||||
try: import psutil # type: ignore
|
||||
except Exception as e: errors.append(f'{e}')
|
||||
|
||||
+try:
|
||||
+ from time import tzset
|
||||
+except ImportError:
|
||||
+ tzset = None
|
||||
+
|
||||
SELF_START = time()
|
||||
|
||||
SYSTEM: str
|
||||
@@ -1726,7 +1731,7 @@ class Box:
|
||||
if not "cpu" in cls.boxes or not cls.clock_on: return
|
||||
cls.c_counter += 1
|
||||
if cls.c_counter > 3600 / (Config.update_ms / 1000):
|
||||
- tzset()
|
||||
+ if tzset: tzset()
|
||||
cls.c_counter = 0
|
||||
out: str = ""
|
||||
if force: pass
|
@ -16,7 +16,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-amlogic
|
||||
PKG_VERSION:=3.1.150
|
||||
PKG_VERSION:=3.1.152
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 License
|
||||
|
@ -84,8 +84,8 @@
|
||||
var amlogic_ubootname = document.getElementById('amlogic_uboot');
|
||||
var amlogic_ubootname_value = amlogic_ubootname.value;
|
||||
|
||||
var amlogic_confirm_info = amlogic_soc_text + "@" + amlogic_soc_value;
|
||||
if (confirm('<%:You have chosen:%> [ ' + amlogic_confirm_info + ' ] , <%:Start install?%>') != true) { return false; }
|
||||
var amlogic_confirm_info = amlogic_soc_text;
|
||||
if (confirm('<%:You have chosen:%>' + amlogic_confirm_info + ', <%:Start install?%>') != true) { return false; }
|
||||
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Installing...%> ';
|
||||
@ -144,7 +144,7 @@
|
||||
my_box_mode_id = my_box_mode[0];
|
||||
my_box_mode_name = my_box_mode[1];
|
||||
if ( parseFloat(my_box_mode_id).toString() != "NaN" && my_box_mode_name != "" ) {
|
||||
_option_codes = _option_codes + '<option value="' + my_box_mode_id + '">' + my_box_mode_name.replace(/~/g, " ") + '</option>';
|
||||
_option_codes = _option_codes + '<option value="' + my_box_mode_id + '">[' + my_box_mode_id + '] ' + my_box_mode_name.replace(/~/g, " ") + '</option>';
|
||||
}
|
||||
}
|
||||
_option_codes = _option_codes + '<option value="99"><%:Enter the dtb file name%></option>';
|
||||
|
@ -99,7 +99,7 @@ do_checkemmc() {
|
||||
|
||||
# Check the remaining space
|
||||
do_checkspace() {
|
||||
remaining_space="$(df -hT ${out_path} | grep '/dev/' | awk '{print $5}' | sed 's/.$//' | awk -F "." '{print $1}')"
|
||||
remaining_space="$(df -Tk ${out_path} | grep '/dev/' | awk '{print $5}' | echo $(($(xargs) / 1024 / 1024)))"
|
||||
if [[ -z "$(echo "${remaining_space}" | sed -n "/^[0-9]\+$/p")" ]]; then
|
||||
error_msg "The path is not available, the remaining space cannot be obtained."
|
||||
fi
|
||||
|
@ -1,32 +1,32 @@
|
||||
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.controller.lucky", package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
entry({"admin", "services", "lucky"}, alias("admin", "services", "lucky", "setting"),_("Lucky"), 57).dependent = true
|
||||
entry({"admin", "services", "lucky", "setting"}, cbi("lucky"), _("Base Setting"), 20).leaf=true
|
||||
entry({"admin", "services", "lucky", "lucky"}, template("lucky"), _("Lucky"), 30).leaf = true
|
||||
entry({"admin", "services", "lucky", "lucky_admin"}, call("lucky_admin")).leaf = true
|
||||
entry({"admin", "services", "lucky_status"}, call("act_status"))
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
local port = tonumber(uci:get_first("lucky", "lucky", "port"))
|
||||
local e = { }
|
||||
e.running = luci.sys.call("pidof lucky >/dev/null") == 0
|
||||
e.port = (port or 16601)
|
||||
e.safeurl = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
||||
function lucky_admin()
|
||||
local e = { }
|
||||
e.username = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminAccount | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
|
||||
e.password = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminPassword | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.controller.lucky", package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
entry({"admin", "services", "lucky"}, alias("admin", "services", "lucky", "setting"),_("Lucky"), 57).dependent = true
|
||||
entry({"admin", "services", "lucky", "setting"}, cbi("lucky"), _("Base Setting"), 20).leaf=true
|
||||
entry({"admin", "services", "lucky", "lucky"}, template("lucky"), _("Lucky"), 30).leaf = true
|
||||
entry({"admin", "services", "lucky", "lucky_admin"}, call("lucky_admin")).leaf = true
|
||||
entry({"admin", "services", "lucky_status"}, call("act_status"))
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
local port = tonumber(uci:get_first("lucky", "lucky", "port"))
|
||||
local e = { }
|
||||
e.running = luci.sys.call("pidof lucky >/dev/null") == 0
|
||||
e.port = (port or 16601)
|
||||
e.safeurl = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
||||
function lucky_admin()
|
||||
local e = { }
|
||||
e.username = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminAccount | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
|
||||
e.password = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminPassword | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
@ -1,34 +1,34 @@
|
||||
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
|
||||
local m, s ,o
|
||||
|
||||
m = Map("lucky")
|
||||
m.title = translate("Lucky")
|
||||
m.description = translate("Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp")..translate("</br>For specific usage, see:")..translate("<a href=\'https://github.com/sirpdboy/luci-app-lucky.git' target=\'_blank\'>GitHub @sirpdboy/luci-app-lucky </a>。")
|
||||
|
||||
m:section(SimpleSection).template = "lucky_status"
|
||||
|
||||
s = m:section(TypedSection, "lucky", translate("Global Settings"))
|
||||
s.addremove=false
|
||||
s.anonymous=true
|
||||
|
||||
o = s:option(Flag,"enabled",translate("Enable"))
|
||||
o.default=0
|
||||
|
||||
o = s:option(Value, "port",translate("Set the Lucky access port"))
|
||||
o.datatype = "uinteger"
|
||||
o.default = 16601
|
||||
|
||||
o = s:option(Flag, "AllowInternetaccess", translate("Enable Internet access"))
|
||||
o.default=0
|
||||
|
||||
o = s:option(Button, "lucky_admin", translate("View Password"))
|
||||
o.rawhtml = true
|
||||
o.template = "lucky_admin"
|
||||
|
||||
m.apply_on_parse = true
|
||||
m.on_after_apply = function(self,map)
|
||||
luci.sys.exec("/etc/init.d/lucky restart")
|
||||
end
|
||||
|
||||
return m
|
||||
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
|
||||
local m, s ,o
|
||||
|
||||
m = Map("lucky")
|
||||
m.title = translate("Lucky")
|
||||
m.description = translate("Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp")..translate("</br>For specific usage, see:")..translate("<a href=\'https://github.com/sirpdboy/luci-app-lucky.git' target=\'_blank\'>GitHub @sirpdboy/luci-app-lucky </a>。")
|
||||
|
||||
m:section(SimpleSection).template = "lucky_status"
|
||||
|
||||
s = m:section(TypedSection, "lucky", translate("Global Settings"))
|
||||
s.addremove=false
|
||||
s.anonymous=true
|
||||
|
||||
o = s:option(Flag,"enabled",translate("Enable"))
|
||||
o.default=0
|
||||
|
||||
o = s:option(Value, "port",translate("Set the Lucky access port"))
|
||||
o.datatype = "uinteger"
|
||||
o.default = 16601
|
||||
|
||||
o = s:option(Flag, "AllowInternetaccess", translate("Enable Internet access"))
|
||||
o.default=0
|
||||
|
||||
o = s:option(Button, "lucky_admin", translate("View Password"))
|
||||
o.rawhtml = true
|
||||
o.template = "lucky_admin"
|
||||
|
||||
m.apply_on_parse = true
|
||||
m.on_after_apply = function(self,map)
|
||||
luci.sys.exec("/etc/init.d/lucky restart")
|
||||
end
|
||||
|
||||
return m
|
||||
|
@ -1,37 +1,37 @@
|
||||
<%#
|
||||
Copyright 2021-2022 sirpdboy Wich <sirpdboy@qq.com>
|
||||
https://github.com/sirpdboy/luci-app-lucky
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local safeURL = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
|
||||
local luckyHttpPort = luci.model.uci.cursor():get("lucky", "lucky", "port");
|
||||
-%>
|
||||
|
||||
<%+header%>
|
||||
<div class="cbi-map">
|
||||
|
||||
<iframe id="lucky" style="width: 100%; min-height: 780px; border: none; border-radius: .375rem;box-shadow: rgba(0, 0, 0, 0.75) 0px 0px 15px -5px;"><br/><em style=\"color:red\">
|
||||
<p ><em><%:The Lucky service is not running.%></em></p>
|
||||
</iframe>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ `<%=luckyHttpPort%>`+`<%=safeURL%>`;
|
||||
|
||||
document.getElementById("lucky").src = luckyAdminURL
|
||||
document.getElementById("lucky").height = document.documentElement.clientHeight;
|
||||
window.onresize = function(){
|
||||
document.getElementById("lucky").height = document.documentElement.clientHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%+footer%>
|
||||
<%#
|
||||
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
|
||||
https://github.com/sirpdboy/luci-app-lucky
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local safeURL = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed 's/\"//g' | sed 's/: /\\n/g'|sed '1d' ");
|
||||
local luckyHttpPort = luci.model.uci.cursor():get("lucky", "lucky", "port");
|
||||
-%>
|
||||
|
||||
<%+header%>
|
||||
<div class="cbi-map">
|
||||
|
||||
<iframe id="lucky" style="width: 100%; min-height: 780px; border: none; border-radius: .375rem;box-shadow: rgba(0, 0, 0, 0.75) 0px 0px 15px -5px;"><br/><em style=\"color:red\">
|
||||
<p ><em><%:The Lucky service is not running.%></em></p>
|
||||
</iframe>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ `<%=luckyHttpPort%>`+`<%=safeURL%>`;
|
||||
|
||||
document.getElementById("lucky").src = luckyAdminURL
|
||||
document.getElementById("lucky").height = document.documentElement.clientHeight;
|
||||
window.onresize = function(){
|
||||
document.getElementById("lucky").height = document.documentElement.clientHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%+footer%>
|
||||
|
@ -1,26 +1,26 @@
|
||||
<%+cbi/valueheader%>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function admin_info(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Reading...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "lucky", "lucky_admin")%>',
|
||||
null,
|
||||
function(x,d)
|
||||
{
|
||||
var tb = document.getElementById('<%=self.option%>-status');
|
||||
if (tb)
|
||||
{
|
||||
tb.innerHTML = "<%:Username:%>" + "<font color='green'>" + d.username + "</font>";
|
||||
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + d.password + "</font>";
|
||||
}
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:Read%>';
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
//]]></script>
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
|
||||
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
|
||||
<%+cbi/valueheader%>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function admin_info(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Reading...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "lucky", "lucky_admin")%>',
|
||||
null,
|
||||
function(x,d)
|
||||
{
|
||||
var tb = document.getElementById('<%=self.option%>-status');
|
||||
if (tb)
|
||||
{
|
||||
tb.innerHTML = "<%:Username:%>" + "<font color='green'>" + d.username + "</font>";
|
||||
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + d.password + "</font>";
|
||||
}
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:Read%>';
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
//]]></script>
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
|
||||
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
|
||||
<%+cbi/valuefooter%>
|
@ -1,35 +1,35 @@
|
||||
<%#
|
||||
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
|
||||
https://github.com/sirpdboy/luci-app-lucky
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
|
||||
|
||||
XHR.poll(3, '<%=url([[admin]], [[services]], [[lucky_status]])%>', null,
|
||||
function(x, d) {
|
||||
var tb = document.getElementById('lucky_status');
|
||||
if (d && tb)
|
||||
{
|
||||
if (d.running)
|
||||
{
|
||||
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ d.port+d.safeurl+"";
|
||||
tb.innerHTML = '<em><b style=\"color:green\"><%:The Lucky service is running.%></b></em>'
|
||||
+ '<em> <br/><br/>' + ' <b > <%:Click the new page to open Lucky%> <a href="' +luckyAdminURL+'"'+' target="_blank">' + luckyAdminURL + ' </a> </b> <br/> </em>'
|
||||
}
|
||||
else
|
||||
{
|
||||
tb.innerHTML = '<em><b style=\"color:red\"><%:The Lucky service is not running.%></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<legend><%:Lucky Status%></legend>
|
||||
<p id="lucky_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
<%#
|
||||
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
|
||||
https://github.com/sirpdboy/luci-app-lucky
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
|
||||
|
||||
XHR.poll(3, '<%=url([[admin]], [[services]], [[lucky_status]])%>', null,
|
||||
function(x, d) {
|
||||
var tb = document.getElementById('lucky_status');
|
||||
if (d && tb)
|
||||
{
|
||||
if (d.running)
|
||||
{
|
||||
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ d.port+d.safeurl+"";
|
||||
tb.innerHTML = '<em><b style=\"color:green\"><%:The Lucky service is running.%></b></em>'
|
||||
+ '<em> <br/><br/>' + ' <b > <%:Click the new page to open Lucky%> <a href="' +luckyAdminURL+'"'+' target="_blank">' + luckyAdminURL + ' </a> </b> <br/> </em>'
|
||||
}
|
||||
else
|
||||
{
|
||||
tb.innerHTML = '<em><b style=\"color:red\"><%:The Lucky service is not running.%></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<legend><%:Lucky Status%></legend>
|
||||
<p id="lucky_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
@ -52,13 +52,13 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Lucky dynamic domain name ddns-go service, socat,frp
|
||||
TITLE:=Lucky gdy
|
||||
DEPENDS:=@(i386||x86_64||arm||aarch64||mipsel||mips)
|
||||
URL:=https://github.com/gdy666/lucky
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Main functions of Lucky: dynamic domain name ddns-go service, socat,reverse proxy ,wake on lan
|
||||
Main functions of Lucky: ipv4/ipv6 portforward,ddns,IOT wake on lan ,reverse proxy and more...
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
@ -73,14 +73,20 @@ define Build/Prepare
|
||||
tar -xzvf $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
/etc/lucky/lucky.conf
|
||||
/etc/config/lucky.conf
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/etc/lucky/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lucky $(1)/usr/bin/lucky
|
||||
$(INSTALL_BIN) ./files/lucky.init $(1)/etc/init.d/lucky
|
||||
$(INSTALL_BIN) ./files/luci-lucky.uci-default $(1)/etc/uci-defaults/luci-lucky
|
||||
$(INSTALL_DATA) ./files/default.conf $(1)/etc/lucky/lucky.conf
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
62
luci-app-lucky/lucky/files/default.conf
Normal file
62
luci-app-lucky/lucky/files/default.conf
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"BaseConfigure": {
|
||||
"AdminWebListenPort": 16601,
|
||||
"AdminWebListenTLS": false,
|
||||
"AdminWebListenHttpsPort": 16626,
|
||||
"AdminAccount": "666",
|
||||
"AdminPassword": "666",
|
||||
"AllowInternetaccess": false,
|
||||
"LogMaxSize": 2048,
|
||||
"HttpClientTimeout": 20,
|
||||
"InsecureSkipVerify": false,
|
||||
"DisableModules": null,
|
||||
"SafeURL": ""
|
||||
},
|
||||
"WhiteListConfigure": {
|
||||
"BaseConfigure": {
|
||||
"URL": "",
|
||||
"ActivelifeDuration": 36,
|
||||
"BasicAccount": "666",
|
||||
"BasicPassword": "666"
|
||||
},
|
||||
"WhiteList": null
|
||||
},
|
||||
"BlackListConfigure": {
|
||||
"BlackList": null
|
||||
},
|
||||
"DDNSConfigure": {
|
||||
"Enable": false,
|
||||
"FirstCheckDelay": 0,
|
||||
"Intervals": 0
|
||||
},
|
||||
"DDNSTaskList": null,
|
||||
"ReverseProxyRuleList": null,
|
||||
"SSLCertficateList": null,
|
||||
"PortForwardsRuleList": null,
|
||||
"PortForwardsConfigure": {
|
||||
"PortForwardsLimit": 128,
|
||||
"TCPPortforwardMaxConnections": 1024,
|
||||
"UDPReadTargetDataMaxgoroutineCount": 1024
|
||||
},
|
||||
"WOLDeviceList": null,
|
||||
"WOLServiceConfigure": {
|
||||
"Server": {
|
||||
"Enable": false,
|
||||
"Token": "666666"
|
||||
},
|
||||
"Client": {
|
||||
"Enable": false,
|
||||
"ServerURL": "",
|
||||
"Token": "",
|
||||
"Relay": false,
|
||||
"Key": "",
|
||||
"DeviceName": "",
|
||||
"Mac": "",
|
||||
"BroadcastIP": "",
|
||||
"Port": 9,
|
||||
"Repeat": 5,
|
||||
"PowerOffCMD": "",
|
||||
"UpdateTime": 0
|
||||
}
|
||||
}
|
||||
}
|
@ -7,12 +7,12 @@
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
START=99
|
||||
STOP=15
|
||||
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
CONF=lucky
|
||||
PROG=/usr/bin/lucky
|
||||
LUCKYDIR=/etc/lucky
|
||||
@ -26,7 +26,7 @@ get_config() {
|
||||
}
|
||||
|
||||
set_firewall() {
|
||||
if [ "x$AllowInternetaccess" == "x1" ]; then
|
||||
if [ "x$AllowInternetaccess" = "x1" ]; then
|
||||
uci -q delete firewall.lucky
|
||||
uci set firewall.lucky=rule
|
||||
uci set firewall.lucky.name="lucky"
|
||||
@ -62,7 +62,7 @@ EOF
|
||||
else
|
||||
sed -i 's/"AllowInternetaccess": true,/"AllowInternetaccess": false,/g' "$LUCKYCONF"
|
||||
fi
|
||||
# set_firewall
|
||||
set_firewall
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -c "$LUCKYCONF" -p $port
|
||||
|
@ -20,7 +20,7 @@ PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_MOSDNS_COMPRESS_GOPROXY \
|
||||
CONFIG_MOSDNS_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_DEPENDS:=golang/host upx/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user