adjust: yacd autostart
This commit is contained in:
@@ -467,7 +467,8 @@ start_box() {
|
||||
# Open the yacd in browser
|
||||
if [ "${bin_name}" = "clash" ] && [ "${display_yacd_on_start}" = "true" ]; then
|
||||
sleep 0.5
|
||||
am start -a android.intent.action.VIEW -d http://127.0.0.1:9090/ui
|
||||
ip_port=$(busybox awk '/external-controller:/ {print $2}' "${clash_config}")
|
||||
am start -a android.intent.action.VIEW -d "http://${ip_port}/ui"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ update_yq() {
|
||||
# Check and update geoip and geosite
|
||||
update_subgeo() {
|
||||
log info "daily updates"
|
||||
geodata_mode=$(awk '/geodata-mode:*./{print $2}' "${clash_config}")
|
||||
geodata_mode=$(busybox awk '/geodata-mode:*./{print $2}' "${clash_config}")
|
||||
case "${bin_name}" in
|
||||
clash)
|
||||
geoip_file="${data_dir}/clash/$(if [ "${geodata_mode}" = "false" ]; then echo "Country.mmdb"; else echo "GeoIP.dat"; fi)"
|
||||
@@ -170,8 +170,8 @@ update_subgeo() {
|
||||
if [ "${auto_update_geox}" = "true" ] && log debug "Downloading ${geoip_url}" && update_file "${geoip_file}" "${geoip_url}" && log debug "Downloading ${geosite_url}" && update_file "${geosite_file}" "${geosite_url}"; then
|
||||
log debug "Update geo $(date +"%F %R")"
|
||||
if [ -f "${pid_file}" ] && [ "${bin_name}" = "clash" ] && [ "${meta}" = "true" ]; then
|
||||
ip_port=$(awk '/external-controller:/ {print $2}' "${clash_config}")
|
||||
secret=$(awk '/secret:/ {print $2}' "${clash_config}")
|
||||
ip_port=$(busybox awk '/external-controller:/ {print $2}' "${clash_config}")
|
||||
secret=$(busybox awk '/secret:/ {print $2}' "${clash_config}")
|
||||
busybox wget --header="Authorization: Bearer ${secret}" --post-data "" -O /dev/null "http://${ip_port}/restart" # >/dev/null 2>&1
|
||||
fi
|
||||
flag=false # if true, after the update is complete it will restart BFM
|
||||
@@ -210,8 +210,8 @@ update_subgeo() {
|
||||
rm ${update_file_name}.bak
|
||||
fi
|
||||
if [ -f "${pid_file}" ] && [ "${bin_name}" = "clash" ] && [ "${meta}" = "true" ]; then
|
||||
ip_port=$(awk '/external-controller:/ {print $2}' "${clash_config}")
|
||||
secret=$(awk '/secret:/ {print $2}' "${clash_config}")
|
||||
ip_port=$(busybox awk '/external-controller:/ {print $2}' "${clash_config}")
|
||||
secret=$(busybox awk '/secret:/ {print $2}' "${clash_config}")
|
||||
busybox wget --header="Authorization: Bearer ${secret}" --post-data "" -O /dev/null "http://${ip_port}/restart" # >/dev/null 2>&1
|
||||
flag=false # if it's true, after the update is complete it will restart BFM, but to update proxy_provider you don't need to restart it, just reload it on the dashboard/yacd
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user