Edit: For those just looking for the final working version of the script, here it is:
#!/bin/bash
echo -e “Installing LsAgent…”
hdiutil attach “./LsAgent-osx.dmg” -nobrowse
/Volumes/LsAgent/LsAgent-osx.app/Contents/MacOS/installbuilder.sh --agentkey “Your_Cloud_Key” --mode unattended
echo -e “Cleaning up…”
hdiutil detach “/Volumes/LsAgent”
rm -f “/tmp/LsAgent-osx.dmg”
Helllo,
I am trying to install inventory agent LsAgent from Lansweeper to our MAC osx laptops without much luck.
Here is the required software code I am using:
#!/bin/bash
echo -e “Downloading LsAgent…”
curl -L “https://content.lansweeper.com/l/651653/2018-11-27/4d6yl” -o /tmp/LsAgent-osx.dmg
echo -e “Installing LsAgent…”
hdiutil attach “/tmp/LsAgent-osx.dmg” -nobrowse
~/Volumes/LsAgent/LsAgent-osx.app/Contents/MacOS/installbuilder.sh --agentkey “OUR-CODE” --mode unattended
echo -e “Cleaning up…”
hdiutil detach “/Volumes/LsAgent”
rm -f “/tmp/LsAgent-osx.dmg”
Any help would be appreciated.