Scripts run sequentially, which means one thing before another and one at a time. One command must finish before the next command will run.
So long as the JamfHelper window appears on screen, the JamfHelper process halts the script. It's waiting for input from the end user to close the window, which terminates the command and allows it to move on to the next command.
The solution is pretty simple. Add a space and an ampersand ( & ) to the end of your JamfHelper command. An ampersand at the end of any command spins it off on its own. The window can remain open while allowing the script to continue.
...
-description "Installation can take up to 45 minutes.. Close and save your work now." &
Scripts run sequentially, which means one thing before another and one at a time. One command must finish before the next command will run.
So long as the JamfHelper window appears on screen, the JamfHelper process halts the script. It's waiting for input from the end user to close the window, which terminates the command and allows it to move on to the next command.
The solution is pretty simple. Add a space and an ampersand ( & ) to the end of your JamfHelper command. An ampersand at the end of any command spins it off on its own. The window can remain open while allowing the script to continue.
...
-description "Installation can take up to 45 minutes.. Close and save your work now." &
Awesome! Thanks Bill!!! It proper worked great!
My window isn't staying open, but I'm calling jamfHelper from an IF-THEN statement (I want it to stay open after they click button2). Any ideas?
if [[ $bytes -gt 0 ]]; then
userChoice=$("$jamfHelper" -windowType utility -title "$title" -heading "$heading" -alignHeading left -description "$description" -button1 "$button1" -button2 "$button2" -defaultButton 2 -cancelButton 1 -icon "$icon" &)
if [ "$userChoice" == "2" ]; then
open -a TextEdit "/usr/local/qualys/cloud-agent/log4j_findings.stdout"
else
exit 0
fi
fi