add configure_timedate

This commit is contained in:
Konano 2023-07-22 15:52:21 +08:00
parent a77ed6ec51
commit c33441c4f4
2 changed files with 18 additions and 0 deletions

View File

@ -167,6 +167,14 @@ configure_hostname() {
fi fi
} }
configure_timedate() {
read -p "要修改 时区 吗?[N]: " response
if [[ $response =~ ^[Yy]$ ]]; then
timedatectl set-timezone Asia/Shanghai
fi
}
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." echo "This script must be run as root."
exit 1 exit 1
@ -183,3 +191,4 @@ configure_zsh
configure_tmux configure_tmux
configure_iptables configure_iptables
# configure_hostname # configure_hostname
configure_timedate

View File

@ -167,6 +167,14 @@ configure_hostname() {
fi fi
} }
configure_timedate() {
read -p "要修改 时区 吗?[N]: " response
if [[ $response =~ ^[Yy]$ ]]; then
sudo timedatectl set-timezone Asia/Shanghai
fi
}
if [[ $EUID -eq 0 ]]; then if [[ $EUID -eq 0 ]]; then
echo "This script should not be run as root." echo "This script should not be run as root."
exit 1 exit 1
@ -183,3 +191,4 @@ configure_zsh
configure_tmux configure_tmux
configure_iptables configure_iptables
# configure_hostname # configure_hostname
configure_timedate