• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disabling Rendezvous
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling Rendezvous


  • Subject: Re: Disabling Rendezvous
  • From: Joshua See <email@hidden>
  • Date: Sat, 22 May 2004 12:02:33 -0500

On May 20, 2004, at 5:26 PM, Gnarlodious wrote:
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".
Yeah but this would also do it, and not look like a cat walked on your keyboard:

do shell script "defaults write /Library/Preferences/DirectoryService/DirectoryService Rendezvous 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?
Kill the process, and relaunching it would be worth trying, but I'd suspect doing so would likely cause other problems. You could do the prefs change without AS, and there is probably a CLI command to restart the service cleanly, but I'm inclined to agree with others on the lists that this is a bad idea in general.
--
Sincerely,
Joshua See
_______________________________________________
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.


  • Follow-Ups:
    • Re: Disabling Rendezvous (cats and bugs)
      • From: Gnarlodious <email@hidden>
    • Re: Disabling Rendezvous
      • From: "John C. Welch" <email@hidden>
References: 
 >Disabling Rendezvous (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: Wait until window is open
  • Next by Date: Subject: Re: Variable renaming and managing a folder
  • Previous by thread: Disabling Rendezvous
  • Next by thread: Re: Disabling Rendezvous
  • Index(es):
    • Date
    • Thread