Originally Posted by Crobat
Ahh there we go. That two liner script worked.
How would I go about setting that up to run automatically? Would I use the daemon that lodragon suggested?
Thanks again for the help.
To answer the question;
Save the script in /root with chmod of 700 then as root enter the command crontab -e.
Now the best method though is;
edit the file /etc/ntp.conf with something like;
It is best to have at least one stratum 1 server and a couple of stratum 2 servers. Find a time server near you at the following url http://ntp.isc.org/bin/view/Servers/WebHome
Then create the following script;
# Start/stop/restart the Network Time Protocol Service.
# To make Apache start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.httpd
case "$1" in
/usr/sbin/ntpd -l /var/log/ntpd.log -p /var/run/ntpd.pid ;;
kill -9 `cat /var/run/ntpd.pid ` ;;
kill -HUP `cat /var/run/ntpd.pid ` ;;
echo "usage $0 start|stop|restart" ;;
This ntp service will constantly run each time that the server is booted. As a final bonus configure your spouses/kids M$ boxes to obtain the time from your server.
You can check the status of the ntpd periodically by running the command as root; ntpq
You can find additional information about ntp at http://www.cis.udel.edu/~mills/ntp/html/