Posted on 08-09-2023 10:58 AM
Hi everyone,
Hope someone can help me with the below issues I am having;
I am trying to install a custom app which I got from a vendor in a .dmg format. Within the dmg there is a .pkg file and then two script files called install.tool and uninstall.tool
As per guidance by the vendor I need to run a command to call the "install.tool" via a command and then add a parameter to point it to a server which we have running in our environment. This all needs to happen before the actual installation takes place i.e. while the .dmg file is mounted and I think this is where I am going wrong or having difficulty to run the above script via command before the actual installation takes place.
I have come across a few threads on here to use composer which I have done but I have not had any particular success deploying it via JamfPro.
It seems weird, as if I run the .pkg file (which I got from composer) on the test I have Mac, the program installs fine but not via JamfPro
Sorry my Mac and Jamf skills are not great but learning as I go along, thank you for all your help and patience in advance!
Solved! Go to Solution.
08-10-2023 03:14 AM - edited 08-10-2023 03:25 AM
hi, this is nice and simple.. this is the line we are interested in:
defaults write com.ncpa.settings nms_addr -string "${SERVER}"
when you run install.tool you add a server IP or DNS name ( I don't need to know it) for example lets say its:
test.domain.com
so all we need to do is replace $SERVER with that and run that as a script in the policy.
so create a new script as follows:
#!/bin/sh
# sets server
defaults write com.ncpa.settings nms_addr -string "test.domain.com"
add that to policy setting it to run BEFORE
add pkg to policy
scope to a test Mac and see what happens..
Posted on 08-09-2023 11:14 AM
You may get help faster by naming the app. You would be surprised how many have been in the same situation and posted assistance
Posted on 08-09-2023 11:15 AM
be useful to know the vendor and what you are trying to install..
Posted on 08-09-2023 11:34 AM
The app is called Netclean Proactive agent.
08-09-2023 11:50 AM - edited 08-09-2023 11:53 AM
without seeing what the scripts do its hard to say how this works.
I'd contact their support for more guidance.
you can try:
copy the content of the install.tool script / text file to jamf as a script. you'll need to see how the viable is parsed into the script and possibly hard code it..
upload the pkg to jamf
create a policy that runs the install.tool script 'before'
with the pkg in the policy
worth a try on a test device..
Posted on 08-09-2023 01:30 PM
I’ve already got in contact with their support team however there has been very minimal support as they say they do not support jamf…which i honestly find hard to believe.
here is the command that I need to execute when the dmg is mounted;
Posted on 08-09-2023 11:55 AM
JFYI: There is a post about deploying this app from 2021 as well, where they successfully deployed using Jamf with help from the vendor: https://community.jamf.com/t5/jamf-pro/custom-dict-plist-for-ios/m-p/244110
Posted on 08-09-2023 11:58 AM
check ya link.. copy paste may have let you down 😎
Posted on 08-09-2023 11:59 AM
link works for me, what's it saying for you?
Posted on 08-09-2023 12:01 PM
"I'm trying to find a way to create a custom configuration profile for an app and distribute it to all our iOS devices. The manual only has a guide on how to do it in VMWare Workspace One (where you just copy and paste the whole string into a "custom" field)."
Posted on 08-09-2023 12:01 PM
Hi Bran, the link points to an article for how to install a configuration progile installation before doing this I need the actual software to install on the machine before that.
08-09-2023 12:09 PM - edited 08-09-2023 12:12 PM
https://community.jamf.com/t5/jamf-pro/custom-dict-plist-for-ios/m-p/246702/highlight/true#M230920
I would still consider replying to this user to see if they still have their in-house documentation lying around. Even though they installed for iOS and you're installing for macOS. But yeah, not as useful for your post. Got excited and pulled the trigger too soon, good luck to you! :)
"We got this working, wohoo. Thanks for the help @jcaleshire, we're providing Netclean with some screenshots and information on how to set this up working in Jamf now so that it will be easier for other customers."
Posted on 08-09-2023 04:24 PM
copy paste the install.tool script here.. (or DM me) and we can fix this..
Posted on 08-10-2023 02:49 AM
Hi,
Please see below script of install.tool
Grateful for any help! Been at this for a few weeks now and its giving me sleepless nights!
My scripting skills are not so great
#!/bin/sh
if [[ $(id -u) -ne 0 ]] ; then
echo "Please run this install script as root"
exit 1
fi
while [[ $# -gt 1 ]]
do
key="$1"
case $key in
-s|--server)
SERVER="$2"
shift # past argument
;;
*)
# unknown option
;;
esac
shift # past argument or value
done
if [[ -n ${SERVER} ]]; then
echo SERVER = "${SERVER}"
defaults write com.ncpa.settings nms_addr -string "${SERVER}"
installer -pkg netclean-proactive-agent-*.pkg -target /
else
echo "Server needs to be specified."
echo "Please use install.tool -s \"ip or dns\""
fi
if [[ -n $1 ]]; then
echo "Last line of file specified as non-opt/last argument:"
echo $1
fi
08-10-2023 03:14 AM - edited 08-10-2023 03:25 AM
hi, this is nice and simple.. this is the line we are interested in:
defaults write com.ncpa.settings nms_addr -string "${SERVER}"
when you run install.tool you add a server IP or DNS name ( I don't need to know it) for example lets say its:
test.domain.com
so all we need to do is replace $SERVER with that and run that as a script in the policy.
so create a new script as follows:
#!/bin/sh
# sets server
defaults write com.ncpa.settings nms_addr -string "test.domain.com"
add that to policy setting it to run BEFORE
add pkg to policy
scope to a test Mac and see what happens..
08-10-2023 07:23 AM - edited 08-10-2023 07:24 AM
That worked! That was nice and simple enough (usually its not 😅)
Thank you very much for your help with this! 😀
Something strange though, as I mentioned in my OP, when I used composer to make a .pkg and have a postflight script to run within this it failed to deploy via Jamf but if I ran the .pkg file from the Mac itself it worked. Any ideas why this could be?
On a side note, is it a good practise to run this policy or any policy for that matter to re-occur in "Check-ins"?
Posted on 08-10-2023 08:17 AM
progress we like it 😎
if you put the script in post flight to set the plist, then this is after the pkg install, when it needs to be before.. maybe that broke it?
pkg install polices should be a run once, unless you have additional logic / smart groups and require a pkg to 'self repair eg when someone removes AV.
Posted on 08-10-2023 09:12 AM
Ah that could be it!
And noted about the PKG install policy might need to tinker the trigger of the policy....
Thanks again