OK, so there’s a .sh shell script file (stored in Resources folder of my app) that I want to run silently in the background. How would I use AppleScript to call this script and run it with admin privileges in the background? I know you can use do shell script for single line commands, but this is a bigger shell script that I need to run in the background.
How would you normally run a shell script in the background?
do shell script "whatever it is you want to do"
Runs it in the background (like without there being prompts and all of that, without opening a Terminal window). I think I might have this figured out though:
set myShellscript to (resource path of main bundle) & "/myscript.sh" do shell script myShellscript with administrator privileges
But I’m not exactly sure if that will allow for proper privileges. I’ll test that.
Just to let everyone know the above solution I posted does work. SOLVED.