1 Reply Latest reply on Nov 9, 2016 9:51 PM by Peter Massa

    Command Line Settings for Mac Install/Uninstall Options


      Is there a way to set a timeout for Macintosh Distribution Packages via the Install/Uninstall Option?

        • 1. Re: Command Line Settings for Mac Install/Uninstall Options
          Peter Massa Expert

          Actually you can!


          Here is an example for installing Slack with a 60 second timeout.


          sleep 15; if [ -d "/Applications/slack.app" ];then exit 0; fi; sleep 45; if [ -d "/Applications/slack.app" ];then exit 0; else killall sdclient; fi;



          The way that this works is that any commands entered into this field are executed right at the same time as the normal package execution occurs.


          In the instance of slack it should copy to the /Applications folder almost instantly.  Which means that when the script runs that I provided above, it will wait 15 seconds and then check if the application was actually put there.  If it was, then the task ends successfully with exit code 0.  If the file is not there, then the script will wait another 45 seconds (total of 60) and do the check again.  This time if the file still has not been copied to the /Applications folder as expected - it will tell sdclient to terminate and the console will show that the task was stopped.


          The only catch is you have to custom tune this process for each package - instead of it being natively supported.  So test - test - test.


          Hope this helps,