luci-app-alist: allow only one protocol to avoid listening on multiple ports

* The introduction of separate HTTP/HTTPS protocols with dedicated ports in alist v3.19.0 is meaningless behavior on OpenWrt.
This commit is contained in:
sbwml 2023-06-18 11:02:19 +08:00
parent 4c1f9b0f91
commit a86f0ee820

View File

@ -61,7 +61,7 @@ start_service() {
set_firewall
cat /dev/null > $temp_dir/alist.log
cat > $CONFIG_DIR/config.json <<EOF
{"force":false,"address":"$listen_addr","port":$port,"cdn":"","jwt_secret":"","token_expires_in":$token_expires_in,"database":{"type":"sqlite3","host":"","port":0,"user":"","password":"","name":"","db_file":"/etc/alist/data.db","table_prefix":"x_","ssl_mode":""},"scheme":{"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},"max_connections":$max_connections}
{"force":false,"address":"$listen_addr","port":$port,"https_port":$port,"cdn":"","jwt_secret":"","token_expires_in":$token_expires_in,"database":{"type":"sqlite3","host":"","port":0,"user":"","password":"","name":"","db_file":"/etc/alist/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},"max_connections":$max_connections}
EOF
procd_open_instance alist
procd_set_param command $PROG