fun with elevated processes
Phil Davis
revdev at pdslabs.net
Thu Oct 14 12:56:37 EDT 2010
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: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> 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
More information about the use-livecode
mailing list