Update menu.sh

Former-commit-id: 15c2bd9cf5f53975f47d6829511d777c2d66a642
This commit is contained in:
fscarmen
2021-09-30 12:29:35 +08:00
committed by GitHub
parent a0b081ef48
commit 5acd01dfcd
+1 -1
View File
@@ -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