Composer - Absolute Secure Access

JuanMoya93
New Contributor

I am looking to Execute Absolute Full Agent, however the PKG relies on a few other files, how can I accomplish this as it seems to have an error code of 0 - getcwd with my script. 

JuanMoya93_3-1746918958162.png

JuanMoya93_2-1746918849276.png

JuanMoya93_0-1746918682363.png

JuanMoya93_1-1746918768334.png



#!/bin/sh
## postinstall
 
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3
 
if sysctl machdep.cpu.brand_string | grep -w "Intel"  ; then
sudo -S installer -allowUntrusted -verboseR -pkg "/private/tmp/Absolute5.10.25/AbsoluteFullAgent.pkg" -target /
 
fi
 
rm -rf "/Private/tmp/Absolute5.10.25/" 2>dev/null
 
 
exit 0 ## Success
exit 1 ## Failure

 

 

3 REPLIES 3

AJPinto
Esteemed Contributor

You probably need to contact the vendor/developer for assistance. 

 

You can try to place all the source files in the directory you are wanting to use, and run that post install command from terminal directly to execute it. It's always best to debug before you package the stuff and try to upload it to Jamf.

Actually, the above postinstall script works, i found my own issue and I noticed there is no space between # & !

Below is the Modified Script

# !/bin/sh
## postinstall
 
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3
 
if sysctl machdep.cpu.brand_string | grep -w "Intel"  ; then
sudo -S installer -allowUntrusted -verboseR -pkg "/private/tmp/Absolute5.10.25/AbsoluteFullAgent.pkg" -target /
 
fi
 
rm -rf "/Private/tmp/Absolute5.10.25/" 2>dev/null
 
 
exit 0 ## Success
exit 1 ## Failure

sdagley
Esteemed Contributor III

@JuanMoya93 A postinstall script is already running as a privileged process so using sudo to elevate privileges is unnecessary, and the allowUntrusted isn't necessary when running the install via the jamf binary, so your call to the installer tool can simply be:

/usr/sbin/installer -pkg "/private/tmp/Absolute5.10.25/AbsoluteFullAgent.pkg" -target /