2023-07-12 10:00:21 +02:00
|
|
|
#!/bin/bash
|
|
|
|
NEWFILE='/var/lib/ntp/drift'
|
|
|
|
if [ -f "$NEWFILE" ]; then
|
|
|
|
/usr/bin/chown ntp:ntp $NEWFILE
|
|
|
|
fi
|
|
|
|
|
2024-04-17 20:55:55 +02:00
|
|
|
# force sync date and time
|
|
|
|
/usr/sbin/ntpd -q -x -g -g -g -g >/dev/null
|
2023-07-12 10:00:21 +02:00
|
|
|
# set hardware clock to the current time
|
|
|
|
/usr/sbin/hwclock --systohc
|
|
|
|
exit 0
|