Skip to main content
Question

How the policy run according to the script result.

  • December 18, 2020
  • 3 replies
  • 29 views

EmreU
Forum|alt.badge.img+6

Hi everyone,
I have a script and this script downloading some packages from Apple Server. There is also one more seperate standalone package. if the first download step is successful (script result 0) then standalone package should work via script. How can I do this automation with script ?

3 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • December 18, 2020

I'm not sure I entirely understand what you're trying to achieve. You have 2 scripts? The first one downloads software updates/packages and the second one does what exactly?


EmreU
Forum|alt.badge.img+6
  • Author
  • Contributor
  • December 21, 2020

Hi @mm2270 I have only one script. The first one downloading some applications.
But this script can may fail because of internet connection issue or any other. that's why I want catch script result.
For example, if script result 0 (download successfully done) then second will policy will work. If download failed then first script will work again.


Forum|alt.badge.img+20
  • Honored Contributor
  • December 21, 2020

@emre.uydu Can you post your script, removing any confidential data, so we can see what you are trying to do? I think I understand your workflow, but not 100%. One idea would to call the second part of your installation in a different policy with a custom trigger. You could then add error checking in your original script to only proceed if the initial downloads were successful.