diff --git a/menu.sh b/menu.sh index 5e1415e..f2a99ab 100644 --- a/menu.sh +++ b/menu.sh @@ -178,7 +178,7 @@ install(){ # 设置开机启动,由于warp bug,有时候获取不了ip地址,在定时任务加了重启后自动刷网络 systemctl enable wg-quick@wgcf >/dev/null 2>&1 grep -qE '^@reboot[ ]*root[ ]*bash[ ]*/etc/wireguard/WARP_AutoUp.sh' /etc/crontab || echo '@reboot root bash /etc/wireguard/WARP_AutoUp.sh' >> /etc/crontab - echo '[[ $(type -P wg-quick) ]] && [[ -e /etc/wireguard/wgcf.conf ]] && wg-quick up wgcf >/dev/null 2>&1' > /etc/wireguard/WARP_AutoUp.sh + echo '[[ $(type -P wg-quick) ]] && [[ -e /etc/wireguard/wgcf.conf ]] && wg-quick up wgcf >/dev/null 2>&1 &&' > /etc/wireguard/WARP_AutoUp.sh echo 'until [[ -n $(wget -T1 -t1 -qO- -4 ip.gs) && -n $(wget -T1 -t1 -qO- -6 ip.gs) ]]' >> /etc/wireguard/WARP_AutoUp.sh echo ' do' >> /etc/wireguard/WARP_AutoUp.sh echo ' wg-quick down wgcf >/dev/null 2>&1' >> /etc/wireguard/WARP_AutoUp.sh