From 5b7c79b0b304d5faa9d303ffd1a96c627604f2ca Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Thu, 21 Apr 2022 19:38:45 +0800 Subject: [PATCH] Update t.sh --- old/t.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/old/t.sh b/old/t.sh index ebaf3bd..df21526 100644 --- a/old/t.sh +++ b/old/t.sh @@ -347,7 +347,7 @@ update(){ 1 ) update_license cd /etc/wireguard || exit sudo sed -i '' "s#license_key.*#license_key = \"$LICENSE\"#g" wgcf-account.toml && - wgcf update --name "$NAME" | sudo tee /etc/wireguard/info.log 2>&1 && + wgcf update --name "$NAME" 2>&1 | sudo tee /etc/wireguard/info.log && (wgcf generate >/dev/null 2>&1 sudo sed -i '' "2s#.*#$(sed -ne 2p wgcf-profile.conf)#;3s#.*#$(sed -ne 3p wgcf-profile.conf)#;4s#.*#$(sed -ne 4p wgcf-profile.conf)#" wgcf.conf wg-quick down wgcf >/dev/null 2>&1 @@ -356,7 +356,7 @@ update(){ green " ${T[${L}35]}\n ${T[${L}36]}:$(grep 'Device name' /etc/wireguard/info.log | awk '{ print $NF }')\n ${T[${L}37]}:$(grep Quota /etc/wireguard/info.log | awk '{ print $(NF-1), $NF }')" ) || red " ${T[${L}38]} ";; 2 ) input_url - [[ $CONFIRM = [Yy] ]] && (echo "$TEAMS" | sudo tee /etc/wireguard/info.log 2>&1 + [[ $CONFIRM = [Yy] ]] && (echo "$TEAMS" 2>&1 | sudo tee /etc/wireguard/info.log sudo sed -i '' "s#PrivateKey.*#PrivateKey = $PRIVATEKEY#g;s#Address.*32#Address = ${ADDRESS4}/32#g;s#Address.*128#Address = ${ADDRESS6}/128#g;s#PublicKey.*#PublicKey = $PUBLICKEY#g" /etc/wireguard/wgcf.conf wg-quick down wgcf >/dev/null 2>&1; net [[ $(curl -ks4 https://www.cloudflare.com/cdn-cgi/trace | grep warp | sed "s/warp=//g") = plus || $(curl -ks6 https://www.cloudflare.com/cdn-cgi/trace | grep warp | sed "s/warp=//g") = plus ]] && green " ${T[${L}39]} ");;