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:
Storm Dragon
2023-08-19 17:09:54 -04:00
parent 88e4b13a71
commit f114eb4859
5 changed files with 25 additions and 25 deletions

View File

@ -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