Syncing system time after boot

My Linux scripting is limited but try putting something like this in autostart.sh

#!/bin/bash

until $(curl --output /dev/null --silent --head --fail --max-time 5 http://google.com); do
  sleep 20
done

ntpd -d -n -q -p europe.pool.ntp.org

It should hit google every 20 seconds until it gets a response then set the network time.

2 Likes