Skip to content

Commit

Permalink
up:v2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
WengHeng committed Dec 27, 2024
1 parent 8b1c7e1 commit c47897d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
KoolCenter Alist Changelog for HND platform
===========================================
2.2.3
- fix 首次安装密码显示错误的问题
- log 优化日志显示

2.2.2
- fix 首次安装不显示初始化密码的问题

Expand Down
23 changes: 12 additions & 11 deletions alist/scripts/alist_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,13 @@ start() {
# 4. gen config.json
makeConfig

# 5. 检测首次运行,给出账号密码
# 5. set is first run
if [ ! -f "${AlistBaseDir}/data.db" ]; then
echo_date "ℹ️检测到首次启动插件,生成用户和密码..."
echo_date "ℹ️初始化操作较耗时,请耐心等待..."
/koolshare/bin/alist --data ${AlistBaseDir} admin random >${AlistBaseDir}/admin.account 2>&1
local USER=$(cat ${AlistBaseDir}/admin.account | grep -E "^username" | awk '{print $2}')
local PASS=$(cat ${AlistBaseDir}/admin.account | grep -E "^password" | awk '{print $2}')
local USER=$(cat ${AlistBaseDir}/admin.account | grep -E "^.*INFO.*username" | awk '{print $NF}')
local PASS=$(cat ${AlistBaseDir}/admin.account | grep -E "^.*INFO.*password" | awk '{print $NF}')
if [ -n "${USER}" -a -n "${PASS}" ]; then
echo_date "---------------------------------"
echo_date "😛alist面板用户:${USER}"
Expand Down Expand Up @@ -684,8 +685,8 @@ random_password() {
# 1. 重新生成密码
echo_date "🔍重新生成alist面板的用户和随机密码..."
/koolshare/bin/alist --data ${AlistBaseDir} admin random > ${AlistBaseDir}/admin.account 2>&1
local USER=$(cat ${AlistBaseDir}/admin.account | grep "username" | awk '{print $NF}')
local PASS=$(cat ${AlistBaseDir}/admin.account | grep "password" | awk '{print $NF}')
local USER=$(cat ${AlistBaseDir}/admin.account | grep -E "^.*INFO.*username" | awk '{print $NF}')
local PASS=$(cat ${AlistBaseDir}/admin.account | grep -E "^.*INFO.*password" | awk '{print $NF}')
if [ -n "${USER}" -a -n "${PASS}" ]; then
echo_date "---------------------------------"
echo_date "😛alist面板用户:${USER}"
Expand All @@ -696,13 +697,13 @@ random_password() {
else
echo_date "⚠️面板账号密码获取失败!请重启路由后重试!"
fi
#2. 关闭server进程
echo_date "重启alist进程..."
stop_process > /dev/null 2>&1
#2. 关闭server进程
echo_date "重启alist进程..."
stop_process > /dev/null 2>&1

# 3. 重启进程
start > /dev/null 2>&1
echo_date "✅重启成功!"
# 3. 重启进程
start > /dev/null 2>&1
echo_date "✅重启成功!"
}

check_status() {
Expand Down
2 changes: 1 addition & 1 deletion alist/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.2
2.2.3
4 changes: 2 additions & 2 deletions config.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"description": "Alist. 一个支持多种存储的文件列表程序,使用 Gin 和 Solidjs",
"home_url": "Module_alist.asp",
"link": "https://github.com/everstu/Koolcenter_alist",
"md5": "bd00e968e1fbf39c55ce5175a1b66ba7",
"md5": "5cd2b0625c54f8ac2840413deb81db70",
"module": "alist",
"tags": "云同步",
"title": "Alist 文件列表",
"version": "2.2.2"
"version": "2.2.3"
}

0 comments on commit c47897d

Please sign in to comment.