Skip to content

Steps to simplify if multiple Linux installs #42

@amjelnes

Description

@amjelnes

First of all thanks for the script, it really made a difference for me!

I used it a couple of times successfully but got a bit annoyed at having to go through the manual steps, so I did a little amateur detective work, below are my findings in the hope it might help someone in the future or maybe even make for an incorporation in the script:

If you need to do mass installs that have the same ClientID, the same Site ID and the same install type you basically only need two more things (beside your static api URL):

  1. the mesh URL
  2. the auth code

Ad. 1:
This actually seem to be a static URL that can be found by:
login to your meshcentral site -> click the "my account" icon in the left menu -> click the device group that your tactical rmm installation created -> click "add agent" -> choose "Linux / BSD / macOS Binary Installer" choose system type "Linux x86-64" (if thats your systemtype) choose Installation type "background only" click the little down arrow icon to the left of where it says "Meshagent" (this will copy the specific link you need),
Insert this link in the command running the script in the place of the mesh central url link.

Ad. 2:
A little more advanced but doable.
In your Tactical RMM site go to -> Agents -> Manage Deployments -> create a new deployment choosing the settings you need (and importantly the expiry date for use multiple times).
This will create a windows installer, copy the download link and insert in a browser to download.
After download find the file and right click choose "open with" (in W11 you may need to choose "more options before you see the open with option"), open with 7zip (install 7zip if you don't have it, it's free and a great compression tool).
In the 7zip menu choose "open archive"
You should now see a folder and a list of files, open the file ".data" with notepad++ (my choice of editor) and look for the line beginning with "build -ldflags="-s -w -X \t\t'main.Inno=tacticalagent-v2.9.1-windows-amd64.exe'" ... in the end of that line you should see a part saying "main.Token=", copy the part AFTER "main.Token=" ... be careful not to copy the '" in the end of the line.
You now have the auth token that you created by creating a deployment installer that can be reused until expiry date chosen by you.
Put you auth token in the command you use to install the linux agent

In the end your command will look like this (values changed for privacy):
./rmmagent-linux.sh install 'https://mesh.example.com/meshagents?id=IakkkkeeT3GrkLtb05L@CtFugfx8G1yyWnS7YAoxmEomnYdDvvZBGWiKvPJ872j&installflags=2&meshinstall=6' 'https://api.example.com' 1 17 'xxxxxxxxxxxxxxxxxxxxxxx' server

I have tested only lightly, so no guarantees that it will work, but so far it's been a success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions