mass deploying a ZIP folder that contains an installer.sh

raphhyyy
New Contributor III

I'm trying to deploy Rapid7's Insight Agent to all of our Mac machines. The ZIP file contains an installer.sh, and .key, .pem, and .json

The instructions listed on their website (copied and pasted below):

  • Fully extract the contents of your downloaded ZIP file.
  • Modify the execute permissions of the installer script: chmod u+x agent_installer.sh
  • Execute the agent_installer.sh script. The agent will be installed as a service (“ir_agent”): sudo ./agent_installer.sh install_start

Any help would be appreciated!

7 REPLIES 7

allanp81
Valued Contributor

Use Jamf composer and deliver those files to an appropriate folder and then add a post install script that runs the sh script.

raphhyyy
New Contributor III

thanks @allanp81 - i've tried briefly with a DMG and PKG packaging those to no avail..

mm2270
Legendary Contributor III

Like @allanp81 mentioned, and to expand on a little, unzip the file contents, make any necessary permissions and/or executable changes on the installer script as noted, and then drop the resulting unzipped folder into /private/tmp/. Then in Composer, drag that folder into the sidebar to create a new Composer source. It should copy them in to the same location.
From there, add a post install script to the Composer source and use the full path to the .sh file (not sudo ./agent_installer.sh install_start) as mentioned in the instructions) and run the script. It would be something like /private/tmp/<foldername>/agent_installer.sh install_start
Build it into a .pkg installer and test.

You will need to test the resulting package from an actual policy, only because sometimes such packages when run locally work fine, but won't work for one reason or another when deployed via Jamf Pro policy. Hopefully it will work as is though.

raphhyyy
New Contributor III

thanks @mm2270 - tried it out, and it worked on my machine, but when i tested on other machines, it would download the files to their computer and i can confirm they are there, but the .sh didn't run

raphhyyy
New Contributor III

so it looks like it IS installing and running the process, but doesn't show in the Activity Monitor app (i don't know why), but DOES show in Terminal when running the command: ps -ax | grep ir_agent

in which we're able to track/monitor on the Rapid7 console... so i guess i'll mark this as solved.

Thanks @mm2270 and @allanp81 for your help!

donmontalvo
Esteemed Contributor III

man tee

--
https://donmontalvo.com

FdzVal
New Contributor

great response and support that worked @mm2270 @allanp81 thanks both