View Single Post
  #1  
Old 07-24-2006, 01:45 PM
marcusororleeus marcusororleeus is offline
Registered User
 
Join Date: Jul 2006
Posts: 2
SD scripting with admin passwords

I'm trying to use SuperDuper to backup our OS X Server. To be safe, I want to stop down all server services running in Server Admin before I do the backup, and restart them after the backup.

I know SuperDuper can do shell scripts, but I only know how to stop services using Applescript (tho the Applescript does trigger shell scripts). How would I write the following applescript purely in shell script style:

Code:
do shell script "serveradmin stop afp" password "ourpassword" with administrator privileges
delay 10
do shell script "serveradmin stop mail" password "ourpassword" with administrator privileges
delay 10
do shell script "serveradmin stop print" password "ourpassword" with administrator privileges
delay 10
do shell script "serveradmin stop web" password "ourpassword" with administrator privileges
delay 10
Any ideas?
Reply With Quote