Skip to main content
Question

Composer - Absolute Secure Access

  • May 10, 2025
  • 3 replies
  • 43 views

Forum|alt.badge.img+2

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. 





#!/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

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • May 11, 2025

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.


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • May 12, 2025

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
Forum|alt.badge.img+25
  • Jamf Heroes
  • May 12, 2025

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

@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 /