luci-app-alist: fix data_dir
This commit is contained in:
parent
bb93e7212f
commit
8b15448511
@ -41,8 +41,8 @@ function clear_log()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function admin_info()
|
function admin_info()
|
||||||
local username = luci.sys.exec("/usr/bin/alist --data /etc/alist password 2>&1 | tail -2 | awk 'NR==1 {print $2}'")
|
local username = luci.sys.exec("/usr/bin/alist --data $(uci -q get alist.@alist[0].data_dir) 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}'")
|
local password = luci.sys.exec("/usr/bin/alist --data $(uci -q get alist.@alist[0].data_dir) password 2>&1 | tail -2 | awk 'NR==2 {print $2}'")
|
||||||
|
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
luci.http.write_json({username = username, password = password})
|
luci.http.write_json({username = username, password = password})
|
||||||
|
@ -59,7 +59,7 @@ start_service() {
|
|||||||
config_load alist
|
config_load alist
|
||||||
config_foreach get_config alist
|
config_foreach get_config alist
|
||||||
[ $enabled != 1 ] && return 1
|
[ $enabled != 1 ] && return 1
|
||||||
mkdir -p $temp_dir
|
mkdir -p $temp_dir $data_dir
|
||||||
[ "$ssl" -eq 1 ] && SSL=true || SSL=false
|
[ "$ssl" -eq 1 ] && SSL=true || SSL=false
|
||||||
[ "$log" -eq 1 ] && LOG=true || LOG=false
|
[ "$log" -eq 1 ] && LOG=true || LOG=false
|
||||||
if [ -e /proc/uptime ]; then
|
if [ -e /proc/uptime ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user