#!/bin/bash
## Set the Lumu Portal credentials <Not admin needed, they can be a standard user>
USER="MyUser@lumu.io"  #Lumu Portal User
PASSWORD="MyPass" #Lumu Portal Pass
## Set the activation code of the installation group 
ACTIVATION_CODE="AWrRT9wP" #Activation Code
#####################################################################
###################  Do not change the following lines ######################
#####################################################################
curl -u "${USER}:${PASSWORD}" --output /tmp/lum_agent_mac_intel.pkg https://artifacts.lumu.io/lum_agent_mac_intel.pkg #Download the Mac Agent
installer -package /tmp/lum_agent_mac_intel.pkg -target / > /tmp/temp.log #Install the package
"/Applications/Lumu Agent.app/Contents/MacOS/lumuagentctl" activation_code $ACTIVATION_CODE #Activate the Lumu Agent