Our company is moving to Freshservice. Working on a policy to push the Freshservice agent to all our Macs. The Agnet is a pkg file and that installs fine but I can't figure out how to make it reference the json file for the registration key and account info. I tried using Composer to create a custom pkg but it flat out doesn't work. Any assistance would be appreciated.
Solved! Go to Solution.
You create it once you build that PKG, do the file copy to the directory then you drag the freshly created FreshserviceAgent.pkg into Composer and drop it in the folder structure. Then you hit build as PKG again and that is your final package. I was confused at first too till I tried that, never would have thought about doing something like that.
Start out by creating a Normal Snapshot, Name it what you like I named it similar to what SmilieK did. After the the snapshot copy the files to a folder easily accessible. I actually put it in /Users/Shared/tmp Once you have the files copied click Create Package Source. When it is finished you will see the file structure. Drag your newly created package into Composer so it adds it to folder structure. Then click Build as PKG. The create your script which actually installs the agent based on SmilieK's example script. Obviously you want to edit the file path if you aren't using what he did. It worked perfectly for me.
Finally this way have work, I don't know why, but only my Mac doesn't work, all the rest in the company have work
What I've done, I've created a folder in the /Library/Application Support/[Business Name]/Fresh Service/ and I've dropped the FS-Agent folder inside it with the json and pkg
Drag the FS-Agent folder in composer, and Apply the permission of the Application Folder to all subfolder
Create the package, that I called FreshServiceAgent.pkg, that package will cache the installer
When the package is done, drag the package in /Library/Application Support/[Business Name]/Fresh Service folder in repackage it.
I've used this script to perform the installation that I run after
#!/bin/sh ## postinstall wait 10 /usr/sbin/installer -allowUntrusted -pkg "/Library/Application Support/[Your Company Name]/FreshService/FreshserviceAgent.pkg" -target / wait 10 /usr/sbin/installer -allowUntrusted -pkg "/Library/Application Support/[Your Company Name]/FreshService/FS-Agent/FS-Agent.pkg" -target / exit 0
I hope it will help you