mirror of
https://gitlab.com/fscarmen/warp.git
synced 2026-06-23 14:42:39 +08:00
Update menu.sh
Former-commit-id: 15c2bd9cf5f53975f47d6829511d777c2d66a642
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user