From 054d71538da4d3344b03442a103ea039a2e66fdd Mon Sep 17 00:00:00 2001 From: Martin Lablans Date: Wed, 28 Sep 2022 17:37:11 +0200 Subject: [PATCH] Check time sync in prereqs --- lib/prerequisites.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/prerequisites.sh b/lib/prerequisites.sh index 4e03530..a89aa54 100755 --- a/lib/prerequisites.sh +++ b/lib/prerequisites.sh @@ -65,6 +65,16 @@ if [ -e /etc/bridgehead/vault.conf ]; then fi fi +if ! which timedatectl > /dev/null; then + log ERROR "systemd time sync is missing -- please install package containing timedatectl" + exit 1 +fi + +if ! timedatectl show | grep NTPSynchronized=yes >/dev/null; then + log ERROR "This server's clock is not synchronized with a time server. This will cause Samply.Beam's certificate will fail. Please enter a correct NTP server (e.g. your institution's Active Directory Domain Controller in /etc/systemd/timesyncd.conf (option NTP=) and restart systemd-timesyncd." + exit 1 +fi + log INFO "Success - all prerequisites are met!" exit 0