add configure_timedate
This commit is contained in:
parent
a77ed6ec51
commit
c33441c4f4
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user