AutomateAPI icon indicating copy to clipboard operation
AutomateAPI copied to clipboard

Reinstall Agent on Mac duplicates the agent

Open itguylearner opened this issue 4 years ago • 2 comments

When I run the repair option of AutomateAPI on Mac computers it duplicates the computer in LT, but when I run the repair option using this code, they are quickly fixed and not duplicated: #maxlength=100000 #timeout=900000 sudo /usr/local/ltechagent/uninstaller.sh cd /tmp curl -L -o 'LT_Install.zip' TOKENURL unzip -o LT_Install.zip chmod 755 LTSvc.mpkg chmod 755 config.sh sudo installer -pkg LTSvc.mpkg -target / Do you think we can test/change the AutomateAPI code to use this one? Thanks!

itguylearner avatar Jun 30 '21 15:06 itguylearner

I fully second and support this. Same experience for us. Would love to see this change implemented!!

tlphipps avatar Jul 02 '21 23:07 tlphipps

Quick update. I did more testing again today and found the above was still causing duplicate agents. HOWEVER, I found the following to properly upgrade the agent and get it back online without causing a duplicate. The key seems to be the "--preserve-agent-files" parameter you pass to the uninstaller.sh file.

Full command: /usr/local/ltechagent/uninstaller.sh --preserve-agent-files curl -o /tmp/LTechAgent.zip TOKENURL unzip -o -d /tmp /tmp/LTechAgent.zip installer -pkg /tmp/LTSvc.mpkg -target /

tlphipps avatar Jul 04 '21 02:07 tlphipps