Update build_nat_network.sh

This commit is contained in:
spiritLHLS 2023-04-27 11:26:28 +08:00 committed by GitHub
parent 6d97af936c
commit db3c323a92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,14 +8,14 @@ _yellow() { echo -e "\033[33m\033[01m$@\033[0m"; }
_blue() { echo -e "\033[36m\033[01m$@\033[0m"; } _blue() { echo -e "\033[36m\033[01m$@\033[0m"; }
reading(){ read -rp "$(_green "$1")" "$2"; } reading(){ read -rp "$(_green "$1")" "$2"; }
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
utf8_locale=$(locale -a 2>/dev/null | grep -i -m 1 -E "utf8|UTF-8") utf8_locale=$(locale -a 2>/dev/null | grep -i -m 1 -E "UTF-8|utf8")
if [[ -z "$utf8_locale" ]]; then if [[ -z "$utf8_locale" ]]; then
_yellow "No UTF-8 locale found" echo "No UTF-8 locale found"
else else
export LC_ALL="$utf8_locale" export LC_ALL="$utf8_locale"
export LANG="$utf8_locale" export LANG="$utf8_locale"
export LANGUAGE="$utf8_locale" export LANGUAGE="$utf8_locale"
_green "Locale set to $utf8_locale" echo "Locale set to $utf8_locale"
fi fi
API_NET=("ip.sb" "ipget.net" "ip.ping0.cc" "https://ip4.seeip.org" "https://api.my-ip.io/ip" "https://ipv4.icanhazip.com" "api.ipify.org") API_NET=("ip.sb" "ipget.net" "ip.ping0.cc" "https://ip4.seeip.org" "https://api.my-ip.io/ip" "https://ipv4.icanhazip.com" "api.ipify.org")