Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Run shell scripts from the Script Menu' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Run shell scripts from the Script Menu
Authored by: webdog on Apr 23, '03 01:10:27PM

Is there any way to have the system perform "root" level scripts
without being logged in as "root"? It would be great to have a
script that could perform a graceful restart of apache from the
finder, for example.



[ Reply to This | # ]
Run shell scripts from the Script Menu
Authored by: googoo on Apr 23, '03 04:05:53PM

You could write a little applescript interface with

do shell script "path/to/script" with administrator privileges

You will be prompted for your password, and then the script will execute as root. You may want to redirect the stdout and stderr to a file so that you can see what happened.

-Mark



[ Reply to This | # ]