update 2023-11-21 23:35:37

This commit is contained in:
github-actions[bot] 2023-11-21 23:35:37 +08:00
parent 44fe463f34
commit d1073fc0f8
6 changed files with 22 additions and 9 deletions

View File

@ -7,8 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-lucky
PKG_VERSION:=1.1.1
PKG_RELEASE:=5
PKG_VERSION:=1.1.2
PKG_RELEASE:=7
LUCI_TITLE:=LuCI Support for Dynamic lucky Client
LUCI_DEPENDS:=+lucky

View File

@ -19,6 +19,8 @@ o = s:option(Value, "port",translate("Set the Lucky access port"))
o.datatype = "uinteger"
o.default = 16601
o = s:option(Value, "safe",translate("Safe entrance"),translate("The panel management portal can only be set to log in to the panel through the specified security portal, such as:/lucky"))
o = s:option( Value, "configdir", translate("Config dir path"),translate("The path to store the config file"))
o.placeholder = "/etc/lucky"
o.default="/etc/lucky"

View File

@ -30,7 +30,7 @@ function Luckyconfig() {
Luckyconfig()
tb.innerHTML = '<em><b style=\"color:green\"><%:The Lucky service is running.%></b></em>';
tb.innerHTML +='<em> <br/><br/><%:Click the new page to open Lucky%> </em>';
tb.innerHTML += "<input class=\"cbi-button cbi-button-reload \" type=\"button\" value=\" "+ URLSAFE+ "\" onclick=\"window.open('"+URL+"')\"/>";
tb.innerHTML += "<input class=\"cbi-button cbi-button-reload \" type=\"button\" value=\" "+ URL + "\" onclick=\"window.open('"+URL+"')\"/>";
}
else
{

View File

@ -43,3 +43,9 @@ msgstr "基本设置"
msgid "Click the new page to open Lucky"
msgstr "点击新页面打开大吉"
msgid "Safe entrance"
msgstr "安全入口"
msgid "The panel management portal can only be set to log in to the panel through the specified security portal, such as:/lucky"
msgstr "面板管理入口,设置后只能通过指定安全入口登录面板,如: /lucky"

View File

@ -43,3 +43,9 @@ msgstr "基本设置"
msgid "Click the new page to open Lucky"
msgstr "点击新页面打开大吉"
msgid "Safe entrance"
msgstr "安全入口"
msgid "The panel management portal can only be set to log in to the panel through the specified security portal, such as:/lucky"
msgstr "面板管理入口,设置后只能通过指定安全入口登录面板,如: /lucky"

11
luci-app-lucky/root/etc/init.d/lucky Normal file → Executable file
View File

@ -14,36 +14,35 @@ STOP=15
CONF="lucky"
PROG=/usr/bin/lucky
DEFAULT_DIR='/etc/config/lucky.daji/'
SET_TZ=""
get_tz()
{
SET_TZ=""
[ -e "/etc/localtime" ] && return
for tzfile in /etc/TZ /var/etc/TZ
do
[ -e "$tzfile" ] || continue
tz="$(cat $tzfile 2>/dev/null)"
done
[ -z "$tz" ] && return
SET_TZ=$tz
}
get_config() {
config_get_bool enabled $1 enabled 1
config_get_bool logger $1 logger 1
config_get port $1 port 16601
config_get SafeURL $1 safe
config_get configdir $1 configdir $DEFAULT_DIR
}
start_service() {
config_load "$CONF"
config_foreach get_config "$CONF"
[ "x$enabled" = "x1" ] || return 1
[ ! -d $configdir ] && mkdir -p $configdir 2>/dev/null
[ $port != 16601 ] && $(which lucky) -setconf -key AdminWebListenPort -value $port -cd $configdir
[ $SafeURL ] && $(which lucky) -setconf -key SafeURL -value $SafeURL -cd $configdir
procd_open_instance
get_tz
[[ -z "$SET_TZ" ]] || procd_set_param env TZ="$SET_TZ"