Good day everyone,
I usually setup our VPN, Cisco Secure Client via https://docs.umbrella.com/umbrella-user-guide/docs/customize-macos-installation-of-cisco-secure-client.
Simple enough to navigate through if you have all the pieces. I am traversing trying to get this process a hair more automated. The end goal: One Policy that can create the DMG you're looking for.
The theory:
- Use composer to package your already configured XML file and orginfo json file into a specific directory.
- Add the newest version of the pre-deploy DMG to that same directory
- Run a script to do any of the steps you need in the url.
I've made this script so far where I want to make the file locations variables and make "Version" a user parameter so when the next version is getting prepared all you have to do is update the version number in the Policy Script Parameters.
#!/bin/sh
#This is to update the Cisco Secure Client
#Create the Variables
Version=“$4”
orgFile=“/private/tmp/orginfo.json"
ciscoFile="/Volumes/Cisco\\ Secure\\ Client\\ $Version/Profiles/Umbrella/"
installFile=“/private/tmp/install_choices.xml"
dmgFile=“/Volumes/Cisco\\ Secure\\ Client\\ $Version”
#Move to the downloads folder
CD /private/tmp
#Make the DMG Writable
hdiutil convert cisco-secure-client-macos-$Version-predeploy-k9.dmg -format UDRW -o csc-writeable.dmg
Sleep 5
#Mount the Installer
hdiutil attach csc-writeable.dmg
Sleep 5
#Open the Installer
open $dmgFile
Sleep 5
#Move the OrgInfo file into the Umbrella Folder
mv $orgFile $ciscoFile
#Move the Install Choice file to the DMG
mv $installFile $dmgFile
Sleep 5
#Eject the Installer
diskutil eject Cisco\\ Secure\\ Client\\ $Version
#Convert and Rename
hdiutil convert csc-writeable.dmg -format UDRO -o csc-readable-$Version.dmg
The Issue:
I've run each of these commands in terminal as root and they all work individually. However, when I run this as a script from my Jamf Policy, it fails and gives me several errors in the logs, which I'll attach as a comment.
Any help on getting these commands to work in the policy or help with troubleshooting the errors would be greatly appreciated.