Optimize startup script logic.

This commit is contained in:
wanhebin 2022-12-16 10:36:27 +08:00 committed by GitHub
parent 2d533ecb1e
commit cf63cc18cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,17 +44,17 @@ Temp_Dir="$Server_Dir/temp"
Log_Dir="$Server_Dir/logs"
URL='更改为你的clash订阅地址'
# 临时取消环境变量
unset http_proxy
unset https_proxy
unset no_proxy
# 检查url是否有效
Text1="Clash订阅地址可访问"
Text2="Clash订阅地址不可访问"
curl -o /dev/null -s -m 10 --connect-timeout 10 -w %{http_code} $URL | grep '[23][0-9][0-9]' &>/dev/null
if_success $Text1 $Text2
# 临时取消环境变量
unset http_proxy
unset https_proxy
unset no_proxy
# 拉取更新config.yml文件
Text3="配置文件config.yaml下载成功"
Text4="配置文件config.yaml下载失败退出启动"