From a6e9cc60097925115eff8cb554a270fe7477ad46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:01:36 +0800 Subject: [PATCH] update 2023-07-05 14:01:36 --- alist/patches/900-fix-https-port.patch | 11 ++++++ luci-app-alist/Makefile | 2 +- luci-app-alist/root/etc/init.d/alist | 51 +++++++++++++++++++++++--- 3 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 alist/patches/900-fix-https-port.patch diff --git a/alist/patches/900-fix-https-port.patch b/alist/patches/900-fix-https-port.patch new file mode 100644 index 00000000..45bb9c07 --- /dev/null +++ b/alist/patches/900-fix-https-port.patch @@ -0,0 +1,11 @@ +--- a/cmd/server.go ++++ b/cmd/server.go +@@ -56,7 +56,7 @@ the address is defined in config file`, + }() + } + if conf.Conf.Scheme.HttpsPort != -1 { +- httpsBase := fmt.Sprintf("%s:%d", conf.Conf.Scheme.Address, conf.Conf.Scheme.HttpPort) ++ httpsBase := fmt.Sprintf("%s:%d", conf.Conf.Scheme.Address, conf.Conf.Scheme.HttpsPort) + utils.Log.Infof("start HTTPS server @ %s", httpsBase) + httpsSrv = &http.Server{Addr: httpsBase, Handler: r} + go func() { diff --git a/luci-app-alist/Makefile b/luci-app-alist/Makefile index 7196c13d..a0fa2f77 100644 --- a/luci-app-alist/Makefile +++ b/luci-app-alist/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-alist -PKG_VERSION:=1.0.9 +PKG_VERSION:=1.0.10 PKG_RELEASE:=1 LUCI_TITLE:=LuCI support for alist diff --git a/luci-app-alist/root/etc/init.d/alist b/luci-app-alist/root/etc/init.d/alist index c6de70fb..85515e7f 100755 --- a/luci-app-alist/root/etc/init.d/alist +++ b/luci-app-alist/root/etc/init.d/alist @@ -58,10 +58,10 @@ set_firewall() { start_service() { config_load alist config_foreach get_config alist - [ $enabled != 1 ] && return 1 + [ $enabled -ne 1 ] && return 1 mkdir -p $temp_dir $data_dir - [ "$ssl" -eq 1 ] && SSL=true || SSL=false - [ "$log" -eq 1 ] && LOG=true || LOG=false + [ "$ssl" -eq 1 ] && https_port=$port http_port="-1" || https_port="-1" http_port=$port + [ "$log" -eq 1 ] && log=true || log=false if [ -e /proc/uptime ]; then [ $(awk -F. '{print $1}' /proc/uptime) -lt "120" ] && delayed_start=$delayed_start || delayed_start=0 else @@ -77,10 +77,50 @@ start_service() { # mysql [ "$mysql" -eq 1 ] && database=mysql || database=sqlite3 set_firewall - cat /dev/null > $temp_dir/alist.log + true > $temp_dir/alist.log cat > $data_dir/config.json <