Skip to content

Commit

Permalink
Revert "add NTP conf with a fallback"
Browse files Browse the repository at this point in the history
This reverts commit 4765473.
  • Loading branch information
inventor02 committed Aug 3, 2024
1 parent b08eaba commit ac84fd2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions device-scripts/update-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ if [ "$ntp_server" == "public" ]; then
ntp_server_addr=$public_compbox
elif [ "$ntp_server" == "venue" ]; then
ntp_server_addr=$compbox_ip
elif [ "$ntp_server" == "venue-fallback" ]; then
ntp_server_addr="$compbox_ip 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
fi

sed 's/#FallbackNTP/FallbackNTP/' /etc/systemd/timesyncd.conf

current_ntp_server=$(awk '/^NTP=/{print $2}' /etc/systemd/timesyncd.conf)
if [ -n "$ntp_server_addr" ] && [ "$current_ntp_server" != "$ntp_server_addr" ]; then
sed -i "s/^#\?NTP=.*/NTP=$ntp_server_addr/" /etc/systemd/timesyncd.conf
Expand Down

0 comments on commit ac84fd2

Please sign in to comment.