First tests with audible prompt worked, so changed the subscripts to use the same method. It should now use audible prompt when available and not give an error if it is not available.
This commit is contained in:
@ -21,15 +21,15 @@ mapfile -t cities < <(timedatectl --no-pager list-timezones | grep "$region" | c
|
||||
$(for i in ${cities[@]} ; do echo "$i";echo "$i";done) --stdout)
|
||||
|
||||
# Set the timezone
|
||||
sudo timedatectl set-timezone ${region}/${city}
|
||||
sudo "${sudoFlags[@]}" timedatectl set-timezone ${region}/${city}
|
||||
if [[ -f /etc/localtime ]]; then
|
||||
sudo rm /etc/localtime
|
||||
sudo "${sudoFlags[@]}" rm /etc/localtime
|
||||
fi
|
||||
sudo ln -s /usr/share/zoneinfo/${region}/${city} /etc/localtime
|
||||
sudo "${sudoFlags[@]}" ln -s /usr/share/zoneinfo/${region}/${city} /etc/localtime
|
||||
|
||||
# Make sure we are syncing with the internet
|
||||
echo "Setting up ntpd"
|
||||
sudo timedatectl set-ntp false
|
||||
sudo systemctl stop ntpd
|
||||
sudo ntpd -Ggq &> /dev/null
|
||||
sudo systemctl enable ntpd --now
|
||||
sudo "${sudoFlags[@]}" timedatectl set-ntp false
|
||||
sudo "${sudoFlags[@]}" systemctl stop ntpd
|
||||
sudo "${sudoFlags[@]}" ntpd -Ggq &> /dev/null
|
||||
sudo "${sudoFlags[@]}" systemctl enable ntpd --now
|
||||
|
Reference in New Issue
Block a user