Re: Set Date & Time Automatically preference
Re: Set Date & Time Automatically preference
- Subject: Re: Set Date & Time Automatically preference
- From: Axel Luttgens <email@hidden>
- Date: Fri, 16 Nov 2007 18:04:49 +0100
On 16/11/07 16:38, Marconi wrote:
At 12:32 PM +0100 11/16/07, Axel Luttgens sent email regarding Re: Set
Date & Time Automatically preference:
[...]
...
Starting with Leopard, NTP seems to have been moved to launchd.
...Are you running Leopard?
Yes, I am.
And I am not. ;-)
So, here follow some guesses only, based on Leopard's source code.
To have the same effect as checking the checkbox in the Date & Time pref
pane, the shell command would be:
sudo launchctl load -w /System/Library/LauchDaemons/org.ntp.ntpd.plist
To have the same effect as unchecking the checkbox:
sudo launchctl unload -w /System/Library/LauchDaemons/org.ntp.ntpd.plist
Note that /etc/hostconfig shouldn't be relevant anymore (the on/off
status is written to the plist itself).
To take changes written to /etc/ntp.conf into account (while a time
server is in use):
sudo launchctl stop org.ntp.ntpd
sudo launchctl start org.ntp.ntpd
Of course, so as to remain on topic, you should enclose all the above in
"do shell script" lines...
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden