From bbef360f7afd8db855eeea12f19050027977181f Mon Sep 17 00:00:00 2001 From: sbwml <984419930@qq.com> Date: Wed, 2 Nov 2022 07:29:06 +0800 Subject: [PATCH] luci-app-alist: init.d: update for v3.3.0 --- luci-app-alist/luasrc/controller/alist.lua | 4 ++-- luci-app-alist/root/etc/init.d/alist | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/luci-app-alist/luasrc/controller/alist.lua b/luci-app-alist/luasrc/controller/alist.lua index 28593a0..4f192ec 100644 --- a/luci-app-alist/luasrc/controller/alist.lua +++ b/luci-app-alist/luasrc/controller/alist.lua @@ -41,8 +41,8 @@ function clear_log() end function admin_info() - local username = luci.sys.exec("/usr/bin/alist --conf /etc/alist/config.json password 2>&1 | tail -2 | awk 'NR==1 {print $2}'") - local password = luci.sys.exec("/usr/bin/alist --conf /etc/alist/config.json password 2>&1 | tail -2 | awk 'NR==2 {print $2}'") + local username = luci.sys.exec("/usr/bin/alist --data /etc/alist password 2>&1 | tail -2 | awk 'NR==1 {print $2}'") + local password = luci.sys.exec("/usr/bin/alist --data /etc/alist password 2>&1 | tail -2 | awk 'NR==2 {print $2}'") luci.http.prepare_content("application/json") luci.http.write_json({username = username, password = password}) diff --git a/luci-app-alist/root/etc/init.d/alist b/luci-app-alist/root/etc/init.d/alist index 3206cf6..bb29913 100755 --- a/luci-app-alist/root/etc/init.d/alist +++ b/luci-app-alist/root/etc/init.d/alist @@ -3,7 +3,7 @@ START=99 USE_PROCD=1 PROG=/usr/bin/alist -CONFIG=/etc/alist/config.json +CONFIG_DIR=/etc/alist get_config() { config_get_bool enabled $1 enabled 1 @@ -61,12 +61,12 @@ start_service() { fi set_firewall cat /dev/null > $temp_dir/alist.log - cat > $CONFIG < $CONFIG_DIR/config.json <