Hi Ken,

On 10/14/10 9:34 AM, Ken Ray wrote:
   I can now easily restart Apache from a LC handler:

on mouseUp
     constant kRestartApache = "apachectl -k graceful"
     open elevated process kRestartApache for neither
     if the result<>  empty then
        answer "Could not restart server."
        close process kRestartApache
     end if
     -- process will normally close itself when finished
end mouseUp
That's cool, Phil! What did you have to do before 'open elevated process'?

I would have used an AppleScript approach:

  put "do shell script" \
&& quote & kRestartApache & quote \
&& "with administrator privileges" \
      into tAppleScriptCommand

  do tAppleScriptCommand as appleScript


Does this take the place of trying to pass an admin password on the command
line?

Yes! The "elevated" keyword apparently causes Rev to ask the OS to do its admin dialog thing before running the process.

Ken Ray
Sons of Thunder Software, Inc.
Email: [email protected]
Web Site: http://www.sonsothunder.com/


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to