#!/bin/sh
# todo: locking? infinity loop?
# todo2: does not take into account that the service may be intentionally disabled
while ! /usr/sbin/ntpwait -v; do sleep 10; done
systemctl stop ntpsec.service
/usr/sbin/ntpd -gq
systemctl start ntpsec.service
