#!/bin/bash

[ -f /etc/khomp/config/kgateway-ntp.cfg ] || {
    exit 1
}

. /etc/khomp/config/kgateway-ntp.cfg

[ "${NTP_ENABLED}" = "yes" ] && {
    [ -x /usr/sbin/ntpdate ] || {
        exit 1
    }
    /usr/sbin/ntpdate -t ${NTP_TIMEOUT} -s ${NTP_SERVERS} && /sbin/hwclock --systohc
}

