Custom MacOS App (Cisco Umbrella) Installation with Arguments/Parameters

Solved
AnthonyI
Getting noticed

Custom MacOS App (Cisco Umbrella) Installation with Arguments/Parameters

Hello,

 

I'm trying to push Cisco Umbrella to MacOS clients using Meraki SM. The app does not exist on the dashboard, so I had to upload the .dmg file. The issue, however, is that the organization info that is located in the 'OrgInfo.plist' file needs to be passed along with the installation - otherwise there is no valid license for the product. 

 

Is anyone familiar with how to get the install to include the organization info?

1 Accepted Solution
PaulF
Meraki Employee
Meraki Employee

The best way would be a combined package. As the roaming client downloads as a PKG, it does make life easier:

 

You're going to follow exactly the same instructions as above:

 

mkdir InstallFile
cd InstallFile
mkdir Content
mkdir scripts
cd Content
touch OrgInfo.plist
cd ../scripts
touch postinstall
chmod a+x postinstall

Drop the OrgInfo.plist into the Content folder 

 

ALSO drop the RoamingClient_MAC_3.0.5.pkg into the same Content folder

 

NOTEWatch out for the name of the roaming client changing with each new release 

 

Edit the postinstall file:

 

#!/bin/bash

mv /tmp/OrgInfo.plist /Library/Application\ Support/OpenDNS\ Roaming\ Client 

exit 0

 

But add a new line after the #!/bin/bash

 

 installer -pkg /tmp/RoamingClient_MAC_3.0.5.pkg -target /

 

NOTE: again, make sure that, whenever creating a new package after a roaming client update, that you update the name of the package. Also note the spaces above too.

 

You can test using the Installer command on your Mac at the command line:

 

sudo installer -pkg RoamingClient_MAC_3.0.5.pkg -target /

Password:

installer: Package name is Umbrella Roaming Client

installer: Installing at base path /

installer: The install was successful.

 

Just to ensure it installs with no issues, and that the relevant directories are created

 

Now, back to Terminal. The command the build the package is identical, but I've changed the names to something a little more appropriate:

 

sudo pkgbuild --identifier com.meraki.umbrellaroamingclient --root Content --script scripts --install-location /tmp/ umbrellaroamingclient.pkg
pkgbuild: Inferring bundle components from contents of content
pkgbuild: Adding top-level postinstall script
pkgbuild: Wrote package to umbrellaroamingclient.pkg

 

And you're all done.

 

 

View solution in original post

6 Replies 6
PaulF
Meraki Employee
Meraki Employee

Hi Anthony.

 

App Store applications have a capability that allows for the usage of Managed App Config. However, as the AnyConnect package is a custom app, this is not available.

 

So, there's several ways this could be achieved, but it's going to take some work...

 

The first one is to have two apps: A generic dmg containing the AnyConnect package, but also a separate packing containing a script that will create the plist for you:

 

https://documentation.meraki.com/SM/Apps_and_Software/Deploying_Scripts_in_Systems_Manager_using_Sof...

 

Contains most of the information that you need. 

 

However, you can also use the pkgbuild application to create a script AND files:

 

In Terminal, type the following:

 

Navigate to somewhere where you want to store your packages

 

 

mkdir InstallFile
cd InstallFile
mkdir Content
mkdir scripts
cd Content
touch OrgInfo.plist
cd ../scripts
touch postinstall
chmod a+x postinstall

 

 

You can now edit the OrgInfo.plist

 

Edit the postinstall file to copy the plist, which will be in /tmp/OrgInfo.plist to wherever you wish

 

Now we can run the following command:

 

 

sudo pkgbuild --identifier com.meraki.scriptpackage --root Content --script scripts --install-location /tmp/ packagename.pkg
pkgbuild: Inferring bundle components from contents of content
pkgbuild: Adding top-level postinstall script
pkgbuild: Wrote package to packagename.pkg

 

 

You'll now have a pkg called packagename.pkg which you can deploy!

AnthonyI
Getting noticed

Thanks Paul. I do have a question about a step in the second method:

 

- I edited the OrgInfo.plist to match the one from the actual download

- What do I need to do with the postinstall file? You mentioned editing it to copy the plist. I'm not sure what content needs to be in the postinstall file.

 

Thanks!

 

PaulF
Meraki Employee
Meraki Employee

Hi Anthony

 

An example would be this:

 

#!/bin/bash

mv /tmp/OrgInfo.plist /Library/Application\ Support/OpenDNS\ Roaming\ Client 

exit 0
AnthonyI
Getting noticed

Hi Paul,

 

That worked! Thank you for including the bash script (and all the detailed steps from your first response 🙂 ). 

 

One last question - since these are two separate .pkg files, is there a way to guarantee that the Umbrella installer package is pushed before the postinstall package? Or even better, combine both into a single package that executes in the correct sequence (Umbrella Installer -> Postinstall pkg)?

PaulF
Meraki Employee
Meraki Employee

The best way would be a combined package. As the roaming client downloads as a PKG, it does make life easier:

 

You're going to follow exactly the same instructions as above:

 

mkdir InstallFile
cd InstallFile
mkdir Content
mkdir scripts
cd Content
touch OrgInfo.plist
cd ../scripts
touch postinstall
chmod a+x postinstall

Drop the OrgInfo.plist into the Content folder 

 

ALSO drop the RoamingClient_MAC_3.0.5.pkg into the same Content folder

 

NOTEWatch out for the name of the roaming client changing with each new release 

 

Edit the postinstall file:

 

#!/bin/bash

mv /tmp/OrgInfo.plist /Library/Application\ Support/OpenDNS\ Roaming\ Client 

exit 0

 

But add a new line after the #!/bin/bash

 

 installer -pkg /tmp/RoamingClient_MAC_3.0.5.pkg -target /

 

NOTE: again, make sure that, whenever creating a new package after a roaming client update, that you update the name of the package. Also note the spaces above too.

 

You can test using the Installer command on your Mac at the command line:

 

sudo installer -pkg RoamingClient_MAC_3.0.5.pkg -target /

Password:

installer: Package name is Umbrella Roaming Client

installer: Installing at base path /

installer: The install was successful.

 

Just to ensure it installs with no issues, and that the relevant directories are created

 

Now, back to Terminal. The command the build the package is identical, but I've changed the names to something a little more appropriate:

 

sudo pkgbuild --identifier com.meraki.umbrellaroamingclient --root Content --script scripts --install-location /tmp/ umbrellaroamingclient.pkg
pkgbuild: Inferring bundle components from contents of content
pkgbuild: Adding top-level postinstall script
pkgbuild: Wrote package to umbrellaroamingclient.pkg

 

And you're all done.

 

 

AnthonyI
Getting noticed

That worked flawlessly! I was able to upload the umbrellaroamingclient.pkg as a custom app and it pushed successfully to the device with the org info intact. 

 

Thanks a lot Paul!

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels