From 6139bc88712e15c631953df537c5e4582c4d8828 Mon Sep 17 00:00:00 2001 From: sbwml Date: Thu, 17 Feb 2022 22:14:42 +0800 Subject: [PATCH] luci: custom temp dir support --- alist/files/alist.config | 1 + alist/files/alist.init | 4 +++- luci-app-alist/luasrc/model/cbi/alist.lua | 1 + luci-app-alist/po/zh_Hans/alist.po | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/alist/files/alist.config b/alist/files/alist.config index abee209..9888df4 100644 --- a/alist/files/alist.config +++ b/alist/files/alist.config @@ -3,3 +3,4 @@ config alist option 'port' '5244' option 'expiration' '60' option 'cleanup_interval' '120' + option 'temp_dir' '/tmp' diff --git a/alist/files/alist.init b/alist/files/alist.init index ed02e8d..0e26136 100755 --- a/alist/files/alist.init +++ b/alist/files/alist.init @@ -10,14 +10,16 @@ get_config() { config_get port $1 port 5244 config_get expiration $1 expiration 60 config_get cleanup_interval $1 cleanup_interval 120 + config_get temp_dir $1 temp_dir "/tmp" } start_service() { config_load alist config_foreach get_config alist [ $enabled != 1 ] && return 1 + mkdir -p $temp_dir cat > $CONFIG <