diff --git a/baseimage/initializeBaseUbuntuImage.sh b/baseimage/initializeBaseUbuntuImage.sh index 1a0628008..35f2b0f44 100755 --- a/baseimage/initializeBaseUbuntuImage.sh +++ b/baseimage/initializeBaseUbuntuImage.sh @@ -130,8 +130,13 @@ fi # https://bugs.launchpad.net/ubuntu/+source/collectd/+bug/1872281 [[ "${ubuntu_version}" == "20.04" ]] && echo -e "\nLD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so" >> /etc/default/collectd +# some hosts like atlantic install ntp which conflicts with timedatectl. https://serverfault.com/questions/1024770/ubuntu-20-04-time-sync-problems-and-possibly-incorrect-status-information echo "==> Configuring host" sed -e 's/^#NTP=/NTP=0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org/' -i /etc/systemd/timesyncd.conf +if systemctl is-active ntp; then + systemctl stop ntp + apt purge -y ntp +fi timedatectl set-ntp 1 # mysql follows the system timezone timedatectl set-timezone UTC diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index 0e2a239b5..86044951f 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -102,19 +102,13 @@ echo " Join us at https://forum.cloudron.io for any questions." echo "" if [[ "${initBaseImage}" == "true" ]]; then - echo "=> Installing software-properties-common" - if ! apt-get install -y software-properties-common &>> "${LOG_FILE}"; then - echo "Could not install software-properties-common (for add-apt-repository below). See ${LOG_FILE}" - exit 1 - fi - echo "=> Updating apt and installing script dependencies" if ! apt-get update &>> "${LOG_FILE}"; then echo "Could not update package repositories. See ${LOG_FILE}" exit 1 fi - if ! DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install curl python3 ubuntu-standard -y &>> "${LOG_FILE}"; then + if ! DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install curl python3 ubuntu-standard software-properties-common -y &>> "${LOG_FILE}"; then echo "Could not install setup dependencies (curl). See ${LOG_FILE}" exit 1 fi