Closed pbm-jfields closed 2 years ago
I do something like this for an app I deploy. Here's how the MunkiPkg project folder looks:
./FooApp
├── README.md
├── build
│ └── FooApp-10.6.5.pkg
├── build-info.yaml
├── payload
│ └── private
│ └── tmp
│ └── FooApp
│ ├── FooApp.conf
│ └── installer.sh
└── scripts
└── postinstall
And here's the postinstall, abridged:
#!/bin/bash
sh "$3/private/tmp/FooApp/installer.sh"
Note that package preinstall/postinstall scripts should not have a .sh
extension. Whether other scripts have an extension or not is up to you.
I am trying to install Rapid7 using this project but I am running into some issues. All config files must be in the same folder as the Rapid7 agent_installer.sh script so I wrote postinstall.sh to call the agent_installer.sh script but it does not appear to be working. I have tried both full path and the relative path in the postinstall.sh script but have been unsuccessful. Any ideas on how to get this to work?