mirror of
https://github.com/kenzok8/openwrt-packages.git
synced 2025-01-07 03:06:43 +08:00
update 2024-09-13 20:11:28
This commit is contained in:
parent
b9a5137e0c
commit
d2f9e1d158
@ -104,7 +104,7 @@ start_service() {
|
||||
config_load alist
|
||||
config_foreach get_config alist
|
||||
[ $enabled -ne 1 ] && return 1
|
||||
mkdir -p $temp_dir $data_dir
|
||||
mkdir -p "$temp_dir" "$data_dir"
|
||||
[ "$ssl" -eq 1 ] && https_port=$port http_port="-1" || https_port="-1" http_port=$port
|
||||
if [ -e /proc/uptime ]; then
|
||||
[ $(awk -F. '{print $1}' /proc/uptime) -lt "120" ] && delayed_start=$delayed_start || delayed_start=0
|
||||
@ -120,7 +120,7 @@ start_service() {
|
||||
fi
|
||||
|
||||
set_firewall
|
||||
true > $LOG_FILE
|
||||
> $LOG_FILE
|
||||
|
||||
# init config
|
||||
json_init
|
||||
@ -221,12 +221,13 @@ start_service() {
|
||||
json_add_boolean "ssl" "$s3_ssl"
|
||||
json_close_object
|
||||
|
||||
json_dump > $data_dir/config.json
|
||||
json_dump > "$data_dir/config.json"
|
||||
|
||||
procd_open_instance alist
|
||||
procd_set_param command $PROG
|
||||
procd_append_param command server
|
||||
procd_append_param command --data $data_dir
|
||||
procd_append_param command --data "$data_dir"
|
||||
procd_set_param file "$data_dir/config.json"
|
||||
procd_set_param stdout 0
|
||||
procd_set_param stderr 0
|
||||
procd_set_param respawn
|
||||
@ -235,12 +236,6 @@ start_service() {
|
||||
procd_close_instance alist
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
sleep 2
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "alist"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user