Hi @raxsix
I wonder if absolute paths are supported in the run section…
I would bundle the script in the /bin folder of the sandbox (which is in the path) and call it without path in the run section.
Please note that:
you’ll also need to bind the /bin/sh executable in the sandbox, otherwise your script won’t run (you don’t have sh by default in the sandbox)
I think that executables are launched in parallel on the run section, so you can’t expect that your app will be launched after the script is terminated.
What about just calling the script via a system (system(“/bin/sh /usr/bin/script.sh”)) call at the front end of your app? That will provide that it runs before your app gets going.
Just one “system” call.
system(“/bin/sh ./script.sh”);
Add it to your “bundles” to put it in your local directory in your adef like this:
bundles:
{
[xr] …/script.sh ./ //or [xr] …/script.sh ./bin/ this assumes that the script.sh you wrote is in your project //directory
}