Update ssh.sh

This commit is contained in:
spiritlhl 2023-06-20 20:37:15 +08:00 committed by GitHub
parent 30c6de0bed
commit b49d2f11cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,15 @@ for ((int = 0; int < ${#REGEX[@]}; int++)); do
done
[[ -z $SYSTEM ]] && exit 1
[[ $EUID -ne 0 ]] && exit 1
utf8_locale=$(locale -a 2>/dev/null | grep -i -m 1 -E "UTF-8|utf8")
if [[ -z "$utf8_locale" ]]; then
echo "No UTF-8 locale found"
else
export LC_ALL="$utf8_locale"
export LANG="$utf8_locale"
export LANGUAGE="$utf8_locale"
echo "Locale set to $utf8_locale"
fi
checkupdate(){
if command -v apt-get > /dev/null 2>&1; then