Pages

Tuesday, March 9, 2010

Setting NTP on my Ubuntu server

date -s '03/02/2010 11:25:25'
clock -w
echo "clock -s" /sbin/hwclock
date
chmod +x /sbin/hwclock
nano /etc/ntp.conf

dpkg-reconfigure tzdata

crontab -e

50 23 * * * /usr/sbin/ntpdate ntp.irri.org
1 0 * * * /sbin/shutdown -r 0
5 0 * * * sh /var/fw.sh
1 11 * * * /sbin/shutdown -r 0
3 11 * * * sh /var/fw.sh
1 06 * * * /sbin/shutdown -r 0
3 06 * * * sh /var/fw.sh

No comments: