Ensure NTP is enabled on Armbian

This commit is contained in:
Taylor Helsper 2022-12-08 22:00:16 -06:00
parent d3b80c52a3
commit c453100bec
2 changed files with 9 additions and 1 deletions

View File

@ -161,9 +161,13 @@ if ! skip_base_upgrades ; then
$TORIFY apt-get -y install cloud-init $TORIFY apt-get -y install cloud-init
fi fi
# Make sure some software is removed # Use timesyncd for NTP
apt-get -y purge ntp # (conflicts with systemd-timedatectl) apt-get -y purge ntp # (conflicts with systemd-timedatectl)
apt-get -y purge chrony # (conflicts with systemd-timedatectl) apt-get -y purge chrony # (conflicts with systemd-timedatectl)
if [ $IS_ARMBIAN = 1 ] ; then
$TORIFY apt-get -y install systemd-timesyncd
timedatectl set-ntp true
fi
# Install nginx # Install nginx

View File

@ -241,6 +241,10 @@ fi
if [ $IS_X86 = 1 ]; then if [ $IS_X86 = 1 ]; then
apt-get -y install cloud-init apt-get -y install cloud-init
fi fi
if [ $IS_ARMBIAN = 1 ] ; then
apt-get -y install systemd-timesyncd
timedatectl set-ntp true
fi
# Make sure some software is removed # Make sure some software is removed
apt-get -y purge ntp # (conflicts with systemd-timedatectl) apt-get -y purge ntp # (conflicts with systemd-timedatectl)