cron force sync date ntp ubuntu 12

By | January 10, 2023
#!/bin/bash

BEFORE=$(date "+%Y-%m-%d %H:%M:%S")

#ini masih gagal jika ditaruh di cron root
#ntpdate ntp.ubuntu.com


#kita coba ini sekarang
service ntp stop
ntpd -gq
service ntp start

AFTER=$(date "+%Y-%m-%d %H:%M:%S")

echo "Before reset : $BEFORE          After: $AFTER" >> telo.log

Leave a Reply

Your email address will not be published. Required fields are marked *