diff --git a/src/mtproto.sh b/src/mtproto.sh index 2c61c3e..6cabb7c 100644 --- a/src/mtproto.sh +++ b/src/mtproto.sh @@ -7,7 +7,7 @@ _view_mtproto_info() { } _mtproto_info() { _load status.sh - _get_status + _get_status 1 [[ -z $ip ]] && get_ip echo echo "---------- Telegram MTProto 配置信息 -------------" diff --git a/src/qr.sh b/src/qr.sh index 0a3d285..05469e9 100644 --- a/src/qr.sh +++ b/src/qr.sh @@ -1,5 +1,5 @@ _load status.sh -_get_status +_get_status 1 _qr_create() { local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)" local link="https://233boy.github.io/tools/qr.html#${vmess}" diff --git a/src/socks.sh b/src/socks.sh index fbddc6c..4ef05ce 100644 --- a/src/socks.sh +++ b/src/socks.sh @@ -7,7 +7,7 @@ _view_socks_info() { } _socks_info() { _load status.sh - _get_status + _get_status 1 [[ -z $ip ]] && get_ip echo echo "---------- Socks 配置信息 -------------" diff --git a/src/ss-info.sh b/src/ss-info.sh index 2622540..b742963 100644 --- a/src/ss-info.sh +++ b/src/ss-info.sh @@ -1,5 +1,5 @@ _load status.sh -_get_status +_get_status 1 [[ -z $ip ]] && get_ip if [[ $shadowsocks ]]; then #local ss="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#${_site}_ss_${ip}" diff --git a/src/status.sh b/src/status.sh index 594459d..a42464b 100644 --- a/src/status.sh +++ b/src/status.sh @@ -1,5 +1,5 @@ _check_status() { - sleep 2 + sleep 1.5 unset v2ray_pid if [[ ! $(pgrep -f /usr/bin/v2ray/v2ray) ]]; then _err_msg @@ -16,7 +16,8 @@ _check_status() { _get_status() { if [[ ! $v2ray_pid ]]; then _err_msg - elif [[ $v2ray_transport == [45] && $caddy ]] && [[ ! $caddy_pid ]]; then + fi + if [[ $v2ray_transport == [45] && $caddy ]] && [[ $1 && ! $caddy_pid ]]; then _err_msg "Caddy" fi }