Disabling Rendezvous
Disabling Rendezvous
- Subject: Disabling Rendezvous
- From: Gnarlodious <email@hidden>
- Date: Thu, 20 May 2004 16:26:56 -0600
set XMLfile to
"/Library/Preferences/DirectoryService/DirectoryService.plist"
set keyName to "Rendezvous"
set theContent to do shell script "sudo cat " & XMLfile
-- read value
do shell script "echo " & the quoted form of theContent & " | sed -n '/" & ,
keyName & "/{n;s/[^t]<string>\\(.*\\)<\\/string>/\\1/p;}'"
if the result is "Active" then
-- change value
do shell script "echo " & the quoted form of theContent & "sed" & ,
" -e '1N;/" & keyName &
"/{$!N;s/\\(.*\\)Active\\(.*\\)/\\1Inactive\\2/;};P;D' > " & XMLfile
end if
This script sets the .plist file to "Inactive".
However, one would need to tell the service to relaunch pretty much what
the Directory Accesswindow does when you push the "Apply" button.
Any ideas? Apple Event? "Startup Services" shell command?
-- Gnarlie
http://www.Gnarlodious.com/iTunes.html
Gnarlodious iTunes Music (Page generated by Applescript)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.