#!/bin/bash

source /opt/scripts_local/shared_functions.sh
sudo apt purge -y chrony

echo "Installing Time service client"

if ! systemd-detect-virt --container | grep -q "lxc"; then
	sudo timedatectl set-timezone Europe/Brussels
	sudo apt purge -y ntp
	sudo apt install -y systemd-timesyncd
	sudo systemctl start systemd-timesyncd
	sudo systemctl enable systemd-timesyncd
	sudo systemctl status systemd-timesyncd
	timedatectl
fi

echo "Finished Installing Time service client"