luci-app-alist: fix password printing

* daemon.info uwsgi-luci: syntax error: unexpected "&"
This commit is contained in:
sbwml 2022-09-10 10:01:20 +08:00 committed by sbwml
parent b94090d773
commit 3eb834c9b0
2 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ local m, s
local sys = require "luci.sys"
if sys.call("pidof alist >/dev/null") == 0 then
local password = sys.exec("/usr/bin/alist --conf /etc/alist/config.json -password |& tail -1 | awk -F': ' '{print $2}'")
local password = sys.exec("/usr/bin/alist --conf /etc/alist/config.json password 2>&1 | tail -1 | awk -F': ' '{print $2}'")
m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "<font color=\"green\">" .. password .. "</font>" .. "<br/>" .. [[<a href="https://alist.nn.ci/guide/drivers/local.html" target="_blank">]] .. translate("User Manual") .. [[</a>]])
else
m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. "<br/>" .. [[<a href="https://alist.nn.ci/guide/drivers/local.html" target="_blank">]] .. translate("User Manual") .. [[</a>]])