update 2023-07-05 16:26:15
This commit is contained in:
parent
ca5393c133
commit
f307041eba
|
@ -7,13 +7,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=alist
|
||||
PKG_VERSION:=3.20.0
|
||||
PKG_VERSION:=3.20.1
|
||||
PKG_WEB_VERSION:=3.20.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=657801b4e785e79f2d6ce861390e7c451caabc17d287a9f5f9a90265400e9f4e
|
||||
PKG_HASH:=c30e6dfdb0e39615bfcecb17da3a9a643054c6f0eb819d5f45148d2cd0ce2955
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-alist
|
||||
PKG_VERSION:=1.0.9
|
||||
PKG_VERSION:=1.0.10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LUCI_TITLE:=LuCI support for alist
|
||||
|
|
|
@ -58,10 +58,10 @@ set_firewall() {
|
|||
start_service() {
|
||||
config_load alist
|
||||
config_foreach get_config alist
|
||||
[ $enabled != 1 ] && return 1
|
||||
[ $enabled -ne 1 ] && return 1
|
||||
mkdir -p $temp_dir $data_dir
|
||||
[ "$ssl" -eq 1 ] && SSL=true || SSL=false
|
||||
[ "$log" -eq 1 ] && LOG=true || LOG=false
|
||||
[ "$ssl" -eq 1 ] && https_port=$port http_port="-1" || https_port="-1" http_port=$port
|
||||
[ "$log" -eq 1 ] && log=true || log=false
|
||||
if [ -e /proc/uptime ]; then
|
||||
[ $(awk -F. '{print $1}' /proc/uptime) -lt "120" ] && delayed_start=$delayed_start || delayed_start=0
|
||||
else
|
||||
|
@ -77,10 +77,50 @@ start_service() {
|
|||
# mysql
|
||||
[ "$mysql" -eq 1 ] && database=mysql || database=sqlite3
|
||||
set_firewall
|
||||
cat /dev/null > $temp_dir/alist.log
|
||||
true > $temp_dir/alist.log
|
||||
cat > $data_dir/config.json <<EOF
|
||||
{"force":false,"address":"$listen_addr","port":$port,"https_port":$port,"site_url":"$site_url","cdn":"","jwt_secret":"","token_expires_in":$token_expires_in,"database":{"type":"$database","host":"$mysql_host","port":$mysql_port,"user":"$mysql_username","password":"$mysql_password","name":"$mysql_database","db_file":"$data_dir/data.db","table_prefix":"x_","ssl_mode":""},"scheme":{"disable_http":$SSL,"https":$SSL,"cert_file":"$ssl_cert","key_file":"$ssl_key"},"temp_dir":"$temp_dir","log":{"enable":$LOG,"name":"$temp_dir/alist.log","max_size":10,"max_backups":5,"max_age":28,"compress":false},"delayed_start":$delayed_start,"max_connections":$max_connections}
|
||||
{
|
||||
"force": false,
|
||||
"site_url": "$site_url",
|
||||
"cdn": "",
|
||||
"jwt_secret": "",
|
||||
"token_expires_in": $token_expires_in,
|
||||
"database": {
|
||||
"type": "$database",
|
||||
"host": "$mysql_host",
|
||||
"port": $mysql_port,
|
||||
"user": "$mysql_username",
|
||||
"password": "$mysql_password",
|
||||
"name": "$mysql_database",
|
||||
"db_file": "$data_dir/data.db",
|
||||
"table_prefix": "x_",
|
||||
"ssl_mode": ""
|
||||
},
|
||||
"scheme": {
|
||||
"address": "$listen_addr",
|
||||
"http_port": $http_port,
|
||||
"https_port": $https_port,
|
||||
"force_https": false,
|
||||
"cert_file": "$ssl_cert",
|
||||
"key_file": "$ssl_key",
|
||||
"unix_file": "/var/alist.sock"
|
||||
},
|
||||
"temp_dir": "$temp_dir",
|
||||
"bleve_dir": "$data_dir/bleve",
|
||||
"log": {
|
||||
"enable": $log,
|
||||
"name": "$temp_dir/alist.log",
|
||||
"max_size": 10,
|
||||
"max_backups": 5,
|
||||
"max_age": 28,
|
||||
"compress": false
|
||||
},
|
||||
"delayed_start": $delayed_start,
|
||||
"max_connections": $max_connections,
|
||||
"tls_insecure_skip_verify": true
|
||||
}
|
||||
EOF
|
||||
|
||||
procd_open_instance alist
|
||||
procd_set_param command $PROG
|
||||
procd_append_param command server --data $data_dir
|
||||
|
@ -101,5 +141,6 @@ stop_service() {
|
|||
|
||||
reload_service() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue