fix Crond can't start/update geosub, if use_ghproxy=false
[remove] ask want to use ghproxy
This commit is contained in:
@@ -441,8 +441,8 @@ start_box() {
|
||||
create_tun
|
||||
run_box
|
||||
sleep 1
|
||||
# Execute crontab_alive if crontab_sec is not equal to "false"
|
||||
if [ "${crontab_sec}" != "false" ]; then
|
||||
# Execute crontab_alive if run_crontab is not equal to "false"
|
||||
if [ "${run_crontab}" != "false" ]; then
|
||||
crontab_alive
|
||||
else
|
||||
log info "crontab: disabled."
|
||||
|
||||
@@ -486,19 +486,19 @@ api_restart () {
|
||||
}
|
||||
|
||||
# Enable ghproxy to accelerate download
|
||||
if [[ "$use_ghproxy" == false ]] ; then
|
||||
echo "- It seems that you are downloading from GitHub."
|
||||
echo "- Do you want to use the GitHub proxy service to download?"
|
||||
echo "- [ Vol UP: Yes ]"
|
||||
echo "- [ Vol DOWN: No ]"
|
||||
while true; do
|
||||
getevent -lc 1 2>&1 | grep -q KEY_VOLUMEUP && {
|
||||
use_ghproxy=true
|
||||
break
|
||||
}
|
||||
getevent -lc 1 2>&1 | grep -q KEY_VOLUMEDOWN && break
|
||||
done
|
||||
fi
|
||||
# if [[ "$use_ghproxy" == false ]] ; then
|
||||
# echo "- It seems that you are downloading from GitHub."
|
||||
# echo "- Do you want to use the GitHub proxy service to download?"
|
||||
# echo "- [ Vol UP: Yes ]"
|
||||
# echo "- [ Vol DOWN: No ]"
|
||||
# while true; do
|
||||
# getevent -lc 1 2>&1 | grep -q KEY_VOLUMEUP && {
|
||||
# use_ghproxy=true
|
||||
# break
|
||||
# }
|
||||
# getevent -lc 1 2>&1 | grep -q KEY_VOLUMEDOWN && break
|
||||
# done
|
||||
# fi
|
||||
|
||||
case "$1" in
|
||||
upyq)
|
||||
@@ -547,7 +547,7 @@ case "$1" in
|
||||
sleep 0.75
|
||||
update_subs
|
||||
if ! api_restart; then
|
||||
if [ -f "${pid_file}" ] && [ "${bin_name}" != "clash" ] || [ "${flag}" = "true" ]; then
|
||||
if [ -f "${pid_file}" ] && [ "${bin_name}" != "clash" ] && [ "${flag}" = "true" ]; then
|
||||
restart_box
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -46,7 +46,7 @@ ignore_out_list=()
|
||||
# Set update interval using cron, for more information: https://crontab.guru/
|
||||
# set 'true' to enable Cron job
|
||||
interva_update="0 0 * * *" # every 12 p.m
|
||||
crontab_sec="false"
|
||||
run_crontab="false"
|
||||
|
||||
# Type "su -c /data/adb/box/scripts/box.tool geox" to update geox
|
||||
auto_update_geox="true"
|
||||
|
||||
Reference in New Issue
Block a user