mirror of
https://github.com/spiritLHLS/one-click-installation-script.git
synced 2024-11-16 07:52:18 +08:00
Update vnstat.sh
This commit is contained in:
parent
83cb6e67b2
commit
d9a7f92a32
|
@ -3,6 +3,15 @@
|
|||
#from https://github.com/spiritLHLS/one-click-installation-script
|
||||
#version: 2023.02.15
|
||||
|
||||
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
|
||||
red(){ echo -e "\033[31m\033[01m$1$2\033[0m"; }
|
||||
green(){ echo -e "\033[32m\033[01m$1$2\033[0m"; }
|
||||
yellow(){ echo -e "\033[33m\033[01m$1$2\033[0m"; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user