Skip to content

Commit

Permalink
feat(init_ubuntu): update tz config
Browse files Browse the repository at this point in the history
update tz config

Signed-off-by: mritd <[email protected]>
  • Loading branch information
mritd committed Oct 11, 2019
1 parent 3d72647 commit 9761411
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions init_ubuntu.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,28 @@ function disable_cloudinit(){
}

function setlocale(){
locale-gen --purge en_US.UTF-8 zh_CN.UTF-8
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
echo 'LANGUAGE="en_US:en"' >> /etc/default/locale
if [ ! -f /etc/locale.gen.bak ]; then
cp /etc/locale.gen /etc/locale.gen.bak
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
echo 'zh_CN.UTF-8 UTF-8' >> /etc/locale.gen
fi
locale-gen --purge
localectl set-locale LANG=en_US.UTF-8
}

function sysupdate(){
mv /etc/apt/sources.list /etc/apt/sources.list.old
curl -sL ${SOURCES_LIST_URL} | sed "s@{{OS_RELEASE}}@${OS_RELEASE}@gi" > /etc/apt/sources.list
if [ ! -f /etc/apt/sources.list.bak ]; then
cp /etc/apt/sources.list /etc/apt/sources.list.old
curl -sL ${SOURCES_LIST_URL} | sed "s@{{OS_RELEASE}}@${OS_RELEASE}@gi" > /etc/apt/sources.list
fi
apt update -y
apt upgrade -y
apt install -y apt-transport-https ca-certificates software-properties-common \
wget curl vim zsh ctags git htop tzdata conntrack ipvsadm ipset stress sysstat
}

function settimezone(){
ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime
echo ${TZ} > /etc/timezone
timedatectl set-timezone ${TZ}
}

function install_ohmyzsh(){
Expand Down

0 comments on commit 9761411

Please sign in to comment.