Looking inside `install_agent.sh` (which I got from going to https://console.automox.com/downloadInstaller?accesskey=ORGANIZATION-KEY in my browser) I can see on line 249, the script is checking if the file `/opt/amagent/amagent` is present, and if it does the script fails with "${AGENT} already installed" (${AGENT{ is set to `/opt/amagent/amagent` in line 4).
If I were a bettering man, I think removing `/opt/amagent/amagent` would allow the installation script to continue.
I’d suggest moving `/opt/amagent/amagent` to `/opt/amagent/amagent.orig` (or elsewhere) and then retry the installation process.
As an aside, it maybe useful for you to know you can download the Debian package from Automox by going to https://console.automox.com/installer?os=Linux&osname=Debian&osver=12&arch=x86_64&has_systemd=1. It’ll download as `installer`.. you’ll want to rename is something along the lines of `automox-debian12_x86_64.deb` or similar. You may then be able to do a `dpkg -i automox-debian12_x86_64.deb`
If you install it manually like this you’ll need to follow up with the following command
/opt/amagent/amagent --setkey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Where xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx is your Automox key.
You can also set the group using
/opt/amagent/amagent --setgrp XXXX
Where XXXX is your group. Note, you have to prefix it with Default Group/XXXX.. I don’t know why.
I don’t know why companies insist on providing only installation scripts and not links to packages… it makes implementing automatic installation using provisioning tools such as Salt more difficult than it needs to be. That's know I gained the knowledge provided about.
Good luck! Let us know how you get on.
@sscotter
When running the command to deregister the agent(sudo /opt/amagent/amagent --deregister), the following error is displayed:
"no certificate to deregister"
When attempting to purge the agent package(sudo apt-get purge amagent), the error is:
"The package 'amagent' needs to be reinstalled"
Could you please explain the reason for these errors?
What is the recommended method for removing the agent on Debian-based Linux operating systems?
I don’t know why you’re receiving those messages, but unless it’s a issue across multiple machines I wouldn’t put a lot of time into troubleshooting it, I’d just resolved the problem by renaming `/opt/amagent/amagent` to `/opt/amagent/amagent.orig` and reinstalling.
Note, I’m not a Automox employee, just Automox user of three years.