Giter Site home page Giter Site logo

netvolt / linuxrmm-script Goto Github PK

View Code? Open in Web Editor NEW
86.0 11.0 38.0 30 KB

To help users that want to add Linux Agents to Tactical RMM, without need to pay upfront for code signed agents. Thanks to @ZoLuSs for the initial commit. If this solution works for you, consider contributing to Tactical RMM project!

License: MIT License

Shell 100.00%
agent-based rmm tactical

linuxrmm-script's Introduction

rmmagent-script

Script for one-line installing and update of tacticalRMM agent

Now x64, x86, arm64 and armv6 scripts are available but only x64 and i386 tested on Debian 11 and Debian 10 on baremetal, VM (Proxmox) and VPS(OVH) Tested on raspberry 2B+ with armv7l (chose armv6 on install)

Script for other platform will be available futher as I adapt script on other platform. Feel free to adapt script and submit me !

Usage

Download the script that match your configuration

Tips

Download script with this url: https://raw.githubusercontent.com/netvolt/LinuxRMM-Script/main/rmmagent-linux.sh

For Ubuntu systems try: 'wget https://raw.githubusercontent.com/netvolt/LinuxRMM-Script/main/rmmagent-linux.sh' Make executable after downloading: 'sudo chmod +x rmmagent-linux.sh'

Fix Blank Screen for Ubuntu Workstations (Ubuntu 16+)

Ubuntu uses the wayland display manager instead of the regular x11 server. This causes MeshCentral to show a blank screen when trying to access the remote desktop feature. You can't login, view or control the client. There is a neat fix for this, so don't worry:

sudo sed -i '/WaylandEnable/s/^#//g' /etc/gdm3/custom.conf
sudo systemctl restart gdm

This will cause your screen to go blank for a second. You will be able to use remote desktop afterwards.

If you get an error like "file not found", you are probably still using Ubuntu 19 or below. On these machines, the config file will be located on /etc/gdm/custom.conf. Modify the command above accordingly. < Please note that remote desktop features are only installed when you used the workstation agent. You may need to reinstall your mesh agent.

Install

To install agent launch the script with this arguement:

./rmmagent-linux.sh install 'System type' 'Mesh agent' 'API URL' 'Client ID' 'Site ID' 'Auth Key' 'Agent Type'

The compiling can be quite long, don't panic and wait few minutes... USE THE 'SINGLE QUOTES' IN ALL FIELDS!

The argument are:

  1. System type

Type of system. Can be 'amd64' 'x86' 'arm64' 'armv6'

  1. Mesh agent

The url given by mesh for installing new agent. Go to mesh.fqdn.com > Add agent > Installation Executable Linux / BSD / macOS > Select the good system type Copy ONLY the URL with the quote.

  1. API URL

Your api URL for agent communication usually https://api.fqdn.com.

  1. Client ID

The ID of the client in wich agent will be added. Can be view by hovering the name of the client in the dashboard.

  1. Site ID

The ID of the site in wich agent will be added. Can be view by hovering the name of the site in the dashboard.

  1. Auth Key

Authentification key given by dashboard by going to dashboard > Agents > Install agent (Windows) > Select manual and show Copy ONLY the key after --auth.

  1. Agent Type

Can be server or workstation and define the type of agent.

Example

./rmmagent-linux.sh install 'amd64' 'https://mesh.fqdn.com/meshagents?id=XXXXX&installflags=X&meshinstall=X' 'https://api.fqdn.com' 3 1 'XXXXX' server

Update

Simply launch the script that match your system with update as argument.

./rmmagent-linux.sh update

Uninstall

To uninstall agent launch the script with this arguement:

./rmmagent-linux.sh uninstall 'Mesh FQDN' 'Mesh ID'

Note: Single quotes must be around the Mesh ID for it to uninstall the mesh agent properly

The argument are:

  1. Mesh FQDN

Example of FQDN: mesh.fqdn.com

  1. Mesh ID

The ID given by mesh for installing new agent. Go to mesh.fqdn.com > Add agent > Linux / BSD (Uninstall) > Copy ONLY the last value with the single quotes. You are looking for a 64 charaters long value of random letter case, numbers, and special characters.

Example

./rmmagent-linux.sh uninstall mesh.fqdn.com 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

WARNING

  • You should only attempt this if the agent removal feaure on TacticalRMM is not working.
  • Running uninstall will not remove the connections from the TacticalRMM and MeshCentral Dashboard. You will need to manually remove them. It only forcefully removes the agents from your linux box.

linuxrmm-script's People

Contributors

adamprice56 avatar lazee486 avatar mattchis avatar netvolt avatar sympatron avatar truejp avatar zoluss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linuxrmm-script's Issues

Cant Get Download URL without Code Signing

The script needs The url given by mesh for installing new agent. Go to mesh.fqdn.com > Add agent > Installation Executable Linux / BSD / macOS > Select the good system type Copy ONLY the URL with the quote.

However when going to that link I get :

Linux/Mac agents require code signing. Please see https://docs.tacticalrmm.com/code_signing/ for more info.
400: Bad Request

According to the description of this script, it is To help users that want to add Linux Agents to Tactical RMM, without need to pay upfront for code signed agents.

But it looks like we cant use the script unless we are doing just that. Am I missing something?

Update not work

Ao executar o comando update não esta atualizando o agent

root@zorin:/home/pedro/Downloads# ./rmmagent-linux.sh update
tar (child): /tmp/golang.tar.gz: Função open falhou: Arquivo ou diretório inexistente
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
rm: não foi possível remover '/tmp/golang.tar.gz': Arquivo ou diretório inexistente
Golang Install Done !
Agent Compile begin
--2023-05-22 19:00:02-- https://github.com/amidaware/rmmagent/archive/refs/heads/master.zip
Resolvendo github.com (github.com)... 20.201.28.151
Conectando-se a github.com (github.com)|20.201.28.151|:443... conectado.
A requisição HTTP foi enviada, aguardando resposta... 302 Found
Localização: https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master [redirecionando]
--2023-05-22 19:00:02-- https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master
Resolvendo codeload.github.com (codeload.github.com)... 20.201.28.149
Conectando-se a codeload.github.com (codeload.github.com)|20.201.28.149|:443... conectado.
A requisição HTTP foi enviada, aguardando resposta... 200 OK
Tamanho: não especificada [application/zip]
Salvando em: “/tmp/rmmagent.zip”

/tmp/rmmagent.zip [ <=> ] 90,28K --.-KB/s em 0,07s

2023-05-22 19:00:03 (1,31 MB/s) - “/tmp/rmmagent.zip” salvo [92443]

Archive: /tmp/rmmagent.zip
7ea714fc0408677237dd9201403582818dc363a7
creating: /tmp/rmmagent-master/
creating: /tmp/rmmagent-master/.github/
creating: /tmp/rmmagent-master/.github/workflows/
inflating: /tmp/rmmagent-master/.github/workflows/ci.yml
inflating: /tmp/rmmagent-master/.gitignore
creating: /tmp/rmmagent-master/.vscode/
inflating: /tmp/rmmagent-master/.vscode/settings.json
inflating: /tmp/rmmagent-master/LICENSE.md
inflating: /tmp/rmmagent-master/README.md
creating: /tmp/rmmagent-master/agent/
inflating: /tmp/rmmagent-master/agent/agent.go
inflating: /tmp/rmmagent-master/agent/agent_unix.go
inflating: /tmp/rmmagent-master/agent/agent_windows.go
inflating: /tmp/rmmagent-master/agent/checkin.go
inflating: /tmp/rmmagent-master/agent/checks.go
inflating: /tmp/rmmagent-master/agent/choco_windows.go
inflating: /tmp/rmmagent-master/agent/eventlog_windows.go
inflating: /tmp/rmmagent-master/agent/install.go
inflating: /tmp/rmmagent-master/agent/install_unix.go
inflating: /tmp/rmmagent-master/agent/install_windows.go
inflating: /tmp/rmmagent-master/agent/patches_windows.go
inflating: /tmp/rmmagent-master/agent/process.go
inflating: /tmp/rmmagent-master/agent/rpc.go
inflating: /tmp/rmmagent-master/agent/services_windows.go
inflating: /tmp/rmmagent-master/agent/software_windows_386.go
inflating: /tmp/rmmagent-master/agent/software_windows_amd64.go
inflating: /tmp/rmmagent-master/agent/svc.go
inflating: /tmp/rmmagent-master/agent/syscall_windows.go
inflating: /tmp/rmmagent-master/agent/tasks_windows.go
inflating: /tmp/rmmagent-master/agent/utils.go
inflating: /tmp/rmmagent-master/agent/wmi_windows.go
inflating: /tmp/rmmagent-master/agent/wua_windows.go
creating: /tmp/rmmagent-master/build/
inflating: /tmp/rmmagent-master/build/rmm.exe.manifest
inflating: /tmp/rmmagent-master/build/setup.iss
inflating: /tmp/rmmagent-master/go.mod
inflating: /tmp/rmmagent-master/go.sum
inflating: /tmp/rmmagent-master/main.go
creating: /tmp/rmmagent-master/shared/
inflating: /tmp/rmmagent-master/shared/types.go
inflating: /tmp/rmmagent-master/versioninfo.json
cp: não foi possível obter estado de '/tmp/temp_rmmagent': Arquivo ou diretório inexistente
rm: não foi possível remover '/tmp/temp_rmmagent': Arquivo ou diretório inexistente
Tactical Agent Update is done

Golang install breaks $PATH

This installer worked pretty well, but I ran into one issue.

During the golang install it updates the /root/.profile to add "export PATH=/usr/local/go/bin" but after his happens when I restart the SSH session (or log into the console) none of the standard commands work (i.e. ls, nano, etc.). I get the following error:

Command 'ls' is available in the following places
 * /bin/ls
 * /usr/bin/ls
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.

When I check the $PATH the only thing listed is the /usr/local/go/bin path. I had to fix the PATH (export PATH=/bin:/usr/bin) for my session then edit the /root/.profile to comment out the PATH in there. Once that was done, I had no further problems.

Why is the script adding that PATH option to the /root/.profile file? Is there any consequence to leaving that commented out?

Frist agent installs into mesh, further fails

I had success with the first Linux agent install, then when continuing this to further Linux (Ubuntu 22.04, 20) it added the server to Tactical but does not show up in Mesh, only the first server will add.

Is this a known bug or is this something I am causing during deployment?

Unable to install/update on Raspberry Pi

I'm installing on a Raspberry Pi 3B with Ubuntu Server on it. The script seems to proceed normally until the end, when it looks like whatever it's expecting to be in /tmp is not there:

Saving to: ‘/tmp/rmmagent.zip’

/tmp/rmmagent.zip                                      [ <=>                                                                                                           ]  90.40K   495KB/s    in 0.2s

2023-06-07 13:44:23 (495 KB/s) - ‘/tmp/rmmagent.zip’ saved [92565]

Archive:  /tmp/rmmagent.zip
41218f104ac225fef5b70dc9fcd2432c89c5d0ad
   creating: /tmp/rmmagent-master/
   creating: /tmp/rmmagent-master/.github/
   creating: /tmp/rmmagent-master/.github/workflows/
  inflating: /tmp/rmmagent-master/.github/workflows/ci.yml
  inflating: /tmp/rmmagent-master/.gitignore
   creating: /tmp/rmmagent-master/.vscode/
  inflating: /tmp/rmmagent-master/.vscode/settings.json
  inflating: /tmp/rmmagent-master/LICENSE.md
  inflating: /tmp/rmmagent-master/README.md
   creating: /tmp/rmmagent-master/agent/
  inflating: /tmp/rmmagent-master/agent/agent.go
  inflating: /tmp/rmmagent-master/agent/agent_unix.go
  inflating: /tmp/rmmagent-master/agent/agent_windows.go
  inflating: /tmp/rmmagent-master/agent/checkin.go
  inflating: /tmp/rmmagent-master/agent/checks.go
  inflating: /tmp/rmmagent-master/agent/choco_windows.go
  inflating: /tmp/rmmagent-master/agent/eventlog_windows.go
  inflating: /tmp/rmmagent-master/agent/install.go
  inflating: /tmp/rmmagent-master/agent/install_unix.go
  inflating: /tmp/rmmagent-master/agent/install_windows.go
  inflating: /tmp/rmmagent-master/agent/patches_windows.go
  inflating: /tmp/rmmagent-master/agent/process.go
  inflating: /tmp/rmmagent-master/agent/rpc.go
  inflating: /tmp/rmmagent-master/agent/services_windows.go
  inflating: /tmp/rmmagent-master/agent/software_windows_386.go
  inflating: /tmp/rmmagent-master/agent/software_windows_amd64.go
  inflating: /tmp/rmmagent-master/agent/svc.go
  inflating: /tmp/rmmagent-master/agent/syscall_windows.go
  inflating: /tmp/rmmagent-master/agent/tasks_windows.go
  inflating: /tmp/rmmagent-master/agent/utils.go
  inflating: /tmp/rmmagent-master/agent/wmi_windows.go
  inflating: /tmp/rmmagent-master/agent/wua_windows.go
   creating: /tmp/rmmagent-master/build/
  inflating: /tmp/rmmagent-master/build/rmm.exe.manifest
  inflating: /tmp/rmmagent-master/build/setup.iss
  inflating: /tmp/rmmagent-master/go.mod
  inflating: /tmp/rmmagent-master/go.sum
  inflating: /tmp/rmmagent-master/main.go
   creating: /tmp/rmmagent-master/shared/
  inflating: /tmp/rmmagent-master/shared/types.go
  inflating: /tmp/rmmagent-master/versioninfo.json
env: ‘go’: No such file or directory
cp: cannot stat '/tmp/temp_rmmagent': No such file or directory
./rmmagent-linux.sh: line 187: /tmp/temp_rmmagent: No such file or directory
rm: cannot remove '/tmp/temp_rmmagent': No such file or directory
Tactical Agent Install is done

The command I'm using is
sudo ./rmmagent-linux.sh install 'armv6' 'https://mesh.[REDACTED].net/meshagents?id=[REDACTED]&installflags=0&meshinstall=6' 'https://api.[REDACTED].net' '1' '1' '[REDACTED]' 'server'

Alpine Linux

Is it possible to use it on alpine linux? On debian its working fine.

Installation works once on one agent then fails with an error on the second .

The error i keep facing when trying the installation command with all of the correct arguements is this
" inflating: /tmp/rmmagent-master/go.sum
inflating: /tmp/rmmagent-master/main.go
creating: /tmp/rmmagent-master/shared/
inflating: /tmp/rmmagent-master/shared/types.go
inflating: /tmp/rmmagent-master/versioninfo.json
env: ‘go’: No such file or directory
cp: cannot stat '/tmp/temp_rmmagent': No such file or directory
./rmmagent-linux.sh: line 234: /tmp/temp_rmmagent: No such file or directory
rm: cannot remove '/tmp/temp_rmmagent': No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/tacticalagent.service → /etc/systemd/system/tacticalagent.service.
Tactical Agent Install is done
"
2024-07-25_22-11

it says that the agent is installed but on the panel it doesnt show up , how would i go about fixing this

install fails on ubuntu 23.10

Hey,

I have now been able to install the agent several times without any problems, thank you for that.

but unfortunately it didn't work the last time i tried.
to recreate it, i created a vm with similar conditions, but the installation didn't work either.

does anyone have an idea what the problem could be?
system is freshly installed

install logs

--2023-12-08 09:16:37--  https://raw.githubusercontent.com/netvolt/LinuxRMM-Script/main/rmmagent-linux.sh
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.111.133, 185.199.110.133, 185.199.108.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 9064 (8,9K) [text/plain]
Wird in ‘rmmagent-linux.sh’ gespeichert.

rmmagent-linux.sh                               100%[=====================================================================================================>]   8,85K  --.-KB/s    in 0,002s  

2023-12-08 09:16:38 (5,22 MB/s) - ‘rmmagent-linux.sh’ gespeichert [9064/9064]

Fixing $PATH Variable
--2023-12-08 09:16:38--  https://go.dev/dl/go1.18.3.linux-amd64.tar.gz
Auflösen des Hostnamens go.dev (go.dev) … 216.239.32.21, 216.239.36.21, 216.239.38.21, ...
Verbindungsaufbau zu go.dev (go.dev)|216.239.32.21|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 302 Found
Platz: https://dl.google.com/go/go1.18.3.linux-amd64.tar.gz [folgend]
--2023-12-08 09:16:38--  https://dl.google.com/go/go1.18.3.linux-amd64.tar.gz
Auflösen des Hostnamens dl.google.com (dl.google.com) … 142.251.209.142, 2a00:1450:4005:801::200e
Verbindungsaufbau zu dl.google.com (dl.google.com)|142.251.209.142|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 141748419 (135M) [application/x-gzip]
Wird in ‘/tmp/golang.tar.gz’ gespeichert.

/tmp/golang.tar.gz                              100%[=====================================================================================================>] 135,18M  15,3MB/s    in 9,8s    

2023-12-08 09:16:48 (13,9 MB/s) - ‘/tmp/golang.tar.gz’ gespeichert [141748419/141748419]

go/
go/AUTHORS
go/CONTRIBUTING.md
go/CONTRIBUTORS
go/LICENSE
go/PATENTS
go/README.md
go/SECURITY.md
go/VERSION
go/api/
go/api/README
go/api/except.txt
go/api/go1.1.txt
go/api/go1.10.txt
go/api/go1.11.txt
go/api/go1.12.txt
go/api/go1.13.txt
go/api/go1.14.txt
.
.
.
Golang Install Done !
--2023-12-08 09:16:50--  http://rmm-test-vm/
Auflösen des Hostnamens rmm-test-vm (rmm-test-vm) … 127.0.1.1
Verbindungsaufbau zu rmm-test-vm (rmm-test-vm)|127.0.1.1|:80 … fehlgeschlagen: Verbindungsaufbau abgelehnt.
rm: das Entfernen von '/tmp/meshagent.msh' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Agent Compile begin
--2023-12-08 09:16:50--  https://github.com/amidaware/rmmagent/archive/refs/heads/master.zip
Auflösen des Hostnamens github.com (github.com) … 140.82.121.4
Verbindungsaufbau zu github.com (github.com)|140.82.121.4|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 302 Found
Platz: https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master [folgend]
--2023-12-08 09:16:50--  https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master
Auflösen des Hostnamens codeload.github.com (codeload.github.com) … 140.82.121.10
Verbindungsaufbau zu codeload.github.com (codeload.github.com)|140.82.121.10|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 97229 (95K) [application/zip]
Wird in ‘/tmp/rmmagent.zip’ gespeichert.

/tmp/rmmagent.zip                               100%[=====================================================================================================>]  94,95K  --.-KB/s    in 0,09s   

2023-12-08 09:16:51 (1,09 MB/s) - ‘/tmp/rmmagent.zip’ gespeichert [97229/97229]

Archive:  /tmp/rmmagent.zip
dd17ae64a7889fd1094a7f06da4c2ca6bc5525c5
   creating: /tmp/rmmagent-master/
   creating: /tmp/rmmagent-master/.github/
   creating: /tmp/rmmagent-master/.github/workflows/
  inflating: /tmp/rmmagent-master/.github/workflows/ci.yml  
  inflating: /tmp/rmmagent-master/.gitignore  
   creating: /tmp/rmmagent-master/.vscode/
  inflating: /tmp/rmmagent-master/.vscode/settings.json  
  inflating: /tmp/rmmagent-master/LICENSE.md  
  inflating: /tmp/rmmagent-master/README.md  
   creating: /tmp/rmmagent-master/agent/
  inflating: /tmp/rmmagent-master/agent/agent.go  
  inflating: /tmp/rmmagent-master/agent/agent_unix.go  
  inflating: /tmp/rmmagent-master/agent/agent_windows.go  
  inflating: /tmp/rmmagent-master/agent/checkin.go  
  inflating: /tmp/rmmagent-master/agent/checks.go  
  inflating: /tmp/rmmagent-master/agent/choco_windows.go  
  inflating: /tmp/rmmagent-master/agent/embed_darwin.go  
  inflating: /tmp/rmmagent-master/agent/embed_stub.go  
  inflating: /tmp/rmmagent-master/agent/eventlog_windows.go  
  inflating: /tmp/rmmagent-master/agent/install.go  
  inflating: /tmp/rmmagent-master/agent/install_unix.go  
  inflating: /tmp/rmmagent-master/agent/install_windows.go  
  inflating: /tmp/rmmagent-master/agent/patches_windows.go  
  inflating: /tmp/rmmagent-master/agent/process.go  
  inflating: /tmp/rmmagent-master/agent/rpc.go  
   creating: /tmp/rmmagent-master/agent/scripts/
  inflating: /tmp/rmmagent-master/agent/scripts/macos_fix_mesh_install.sh  
  inflating: /tmp/rmmagent-master/agent/services_windows.go  
  inflating: /tmp/rmmagent-master/agent/software_windows_386.go  
  inflating: /tmp/rmmagent-master/agent/software_windows_amd64.go  
  inflating: /tmp/rmmagent-master/agent/svc.go  
  inflating: /tmp/rmmagent-master/agent/syscall_windows.go  
  inflating: /tmp/rmmagent-master/agent/tasks_windows.go  
  inflating: /tmp/rmmagent-master/agent/utils.go  
  inflating: /tmp/rmmagent-master/agent/wmi_windows.go  
  inflating: /tmp/rmmagent-master/agent/wua_windows.go  
   creating: /tmp/rmmagent-master/build/
  inflating: /tmp/rmmagent-master/build/rmm.exe.manifest  
  inflating: /tmp/rmmagent-master/build/setup.iss  
  inflating: /tmp/rmmagent-master/go.mod  
  inflating: /tmp/rmmagent-master/go.sum  
  inflating: /tmp/rmmagent-master/main.go  
   creating: /tmp/rmmagent-master/shared/
  inflating: /tmp/rmmagent-master/shared/types.go  
  inflating: /tmp/rmmagent-master/versioninfo.json  
warning: GOPATH set to GOROOT (/usr/local/go) has no effect
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading github.com/kardianos/service v1.2.2
go: downloading github.com/elastic/go-sysinfo v1.11.1
go: downloading github.com/go-cmd/cmd v1.4.2
go: downloading github.com/go-ping/ping v1.1.0
go: downloading github.com/go-resty/resty/v2 v2.10.0
go: downloading github.com/jaypipes/ghw v0.12.0
go: downloading github.com/nats-io/nats.go v1.31.0
go: downloading github.com/shirou/gopsutil/v3 v3.23.10
go: downloading github.com/spf13/viper v1.17.0
go: downloading github.com/ugorji/go/codec v1.2.11
go: downloading github.com/wh1te909/trmm-shared v0.0.0-20220227075846-f9f757361139
go: downloading golang.org/x/sys v0.14.0
go: downloading github.com/google/uuid v1.3.0
go: downloading golang.org/x/net v0.17.0
go: downloading golang.org/x/sync v0.3.0
go: downloading github.com/klauspost/compress v1.17.2
go: downloading github.com/nats-io/nkeys v0.4.6
go: downloading github.com/nats-io/nuid v1.0.1
go: downloading github.com/tklauser/go-sysconf v0.3.12
go: downloading github.com/fsnotify/fsnotify v1.6.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.10.0
go: downloading github.com/spf13/cast v1.5.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/ghodss/yaml v1.0.0
go: downloading github.com/jaypipes/pcidb v1.0.0
go: downloading howett.net/plist v1.0.0
go: downloading github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901
go: downloading github.com/prometheus/procfs v0.8.0
go: downloading golang.org/x/exp v0.0.0-20230905200255-921286631fa9
go: downloading golang.org/x/crypto v0.15.0
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.7
go: downloading github.com/pelletier/go-toml/v2 v2.1.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/tklauser/numcpus v0.6.1
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading gopkg.in/yaml.v2 v2.4.0
# golang.org/x/exp/slog
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/level.go:159:13: undefined: atomic.Int64
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/attr.go:20:19: undefined: StringValue
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/attr.go:68:19: undefined: GroupValue
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/handler.go:446:15: undefined: StringValue
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/json_handler.go:109:20: v.str undefined (type Value has no field or method str)
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/record.go:192:9: undefined: GroupValue
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/text_handler.go:99:20: v.str undefined (type Value has no field or method str)
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/value.go:87:7: undefined: stringptr
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/value.go:91:7: undefined: groupptr
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/value.go:173:10: undefined: StringValue
/usr/local/go/pkg/mod/golang.org/x/[email protected]/slog/value.go:173:10: too many errors
note: module requires Go 1.20
cp: Aufruf von stat für '/tmp/temp_rmmagent' nicht möglich: Datei oder Verzeichnis nicht gefunden
rmmagent-linux.sh: Zeile 200: /tmp/temp_rmmagent: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von '/tmp/temp_rmmagent' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Created symlink /etc/systemd/system/multi-user.target.wants/tacticalagent.service → /etc/systemd/system/tacticalagent.service.
Tactical Agent Install is done

ah sorry....have overlooked the merge request, so it works

Device not showing on Tactical

I used this script to install the agent on a Linux machine. It's showing up on Mesh but not on Tactical.
Any step thay I may have skipped?

MacOS Script

Hi there! Love your work. This script worked great for setting all my Linux agents up.

Is there any chance you could add MacOS support as well? Intel and Apple Silicon?

Thanks again!

Insecure Install

Hi, Would it be possible to include a parameter for an insecure install, essentially --insecure as with the original agent install if running within the same network using local DNS records and self signed certificates ?

Original Install Agent in Windows will look like this
tacticalagent-v2.7.0-windows-amd64.exe /VERYSILENT /SUPPRESSMSGBOXES && ping 127.0.0.1 -n 5 && "C:\Program Files\TacticalAgent\tacticalrmm.exe" -m install --api https://api.fqdn.com --client-id 1 --site-id 1 --agent-type server --auth xxxxxxx --insecure

Unzip not found (installed tho)

Hi!
For some reason when running your script, I get the error unzip could not be found.
Though I checked, it is installed, and in the $PATH variable.
image

Is this also supposed to populate TRMM dashboard with basic info about server?

First, thank you kindly for this.

I've installed this onto a CentOS 7 server and didn't experience any installation issues. Some notes about this server:

  • SELinux is disabled
  • Firewalld is disabled
  • Server is on same LAN as the TRMM server
  • No issues with disk space, RAM, or CPU

Two problems:

  1. Agent is not communicating and TRMM is showing as offline, even after reboots of agent server and verifying that the tactical agent service is running with systemctl status tacticalagent
  2. Basic information about the server is not populated in the TRMM dashboard, which may be related to the agent showing as offline

Note: The agent appeared in the TRMM dashboard immediately following the successful installation of the agent. But, since that initial appearance, no information has been received by TRMM. I was able to "Remote Control" the server once, but since rebooting, I cannot any longer.

Update not working ('/tmp/temp_rmmagent': No such file or directory)

Tried to use rmmagent-linux.sh update to update my agent. I've got this output and the agent isn't updated.

root@Docker-1:/opt/tacticalmesh# ./rmmagent-linux.sh update
tar (child): /tmp/golang.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
rm: cannot remove '/tmp/golang.tar.gz': No such file or directory
Golang Install Done !
Agent Compile begin
--2023-05-12 22:42:28--  https://github.com/amidaware/rmmagent/archive/refs/heads/master.zip
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master [following]
--2023-05-12 22:42:28--  https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master
Resolving codeload.github.com (codeload.github.com)... 140.82.121.10
Connecting to codeload.github.com (codeload.github.com)|140.82.121.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘/tmp/rmmagent.zip’

/tmp/rmmagent.zip                     [ <=>                                                          ]  90.28K  --.-KB/s    in 0.01s   

2023-05-12 22:42:28 (7.38 MB/s) - ‘/tmp/rmmagent.zip’ saved [92443]

Archive:  /tmp/rmmagent.zip
7ea714fc0408677237dd9201403582818dc363a7
   creating: /tmp/rmmagent-master/
   creating: /tmp/rmmagent-master/.github/
   creating: /tmp/rmmagent-master/.github/workflows/
  inflating: /tmp/rmmagent-master/.github/workflows/ci.yml  
  inflating: /tmp/rmmagent-master/.gitignore  
   creating: /tmp/rmmagent-master/.vscode/
  inflating: /tmp/rmmagent-master/.vscode/settings.json  
  inflating: /tmp/rmmagent-master/LICENSE.md  
  inflating: /tmp/rmmagent-master/README.md  
   creating: /tmp/rmmagent-master/agent/
  inflating: /tmp/rmmagent-master/agent/agent.go  
  inflating: /tmp/rmmagent-master/agent/agent_unix.go  
  inflating: /tmp/rmmagent-master/agent/agent_windows.go  
  inflating: /tmp/rmmagent-master/agent/checkin.go  
  inflating: /tmp/rmmagent-master/agent/checks.go  
  inflating: /tmp/rmmagent-master/agent/choco_windows.go  
  inflating: /tmp/rmmagent-master/agent/eventlog_windows.go  
  inflating: /tmp/rmmagent-master/agent/install.go  
  inflating: /tmp/rmmagent-master/agent/install_unix.go  
  inflating: /tmp/rmmagent-master/agent/install_windows.go  
  inflating: /tmp/rmmagent-master/agent/patches_windows.go  
  inflating: /tmp/rmmagent-master/agent/process.go  
  inflating: /tmp/rmmagent-master/agent/rpc.go  
  inflating: /tmp/rmmagent-master/agent/services_windows.go  
  inflating: /tmp/rmmagent-master/agent/software_windows_386.go  
  inflating: /tmp/rmmagent-master/agent/software_windows_amd64.go  
  inflating: /tmp/rmmagent-master/agent/svc.go  
  inflating: /tmp/rmmagent-master/agent/syscall_windows.go  
  inflating: /tmp/rmmagent-master/agent/tasks_windows.go  
  inflating: /tmp/rmmagent-master/agent/utils.go  
  inflating: /tmp/rmmagent-master/agent/wmi_windows.go  
  inflating: /tmp/rmmagent-master/agent/wua_windows.go  
   creating: /tmp/rmmagent-master/build/
  inflating: /tmp/rmmagent-master/build/rmm.exe.manifest  
  inflating: /tmp/rmmagent-master/build/setup.iss  
  inflating: /tmp/rmmagent-master/go.mod  
  inflating: /tmp/rmmagent-master/go.sum  
  inflating: /tmp/rmmagent-master/main.go  
   creating: /tmp/rmmagent-master/shared/
  inflating: /tmp/rmmagent-master/shared/types.go  
  inflating: /tmp/rmmagent-master/versioninfo.json  
cp: cannot stat '/tmp/temp_rmmagent': No such file or directory
rm: cannot remove '/tmp/temp_rmmagent': No such file or directory
Tactical Agent Update is done

macOS

Hi there, many thanks for the script, is there a macOS version or is the script easily adaptable? Any other known scripts that support macOS?

Agent unavail after update

Hi

When i run script with update switch, then the agent will be unavail in tactical dashboard.
The latest agent version: 2.5.0

Have you any experience with this?

Thank you!
BR
Z

rmm agent service error

during the installation i have an error copying temp_rmmagent to /usr/local/bin/rmmagent because the file is not created by the installation process on my Raspberry Pi 3b+ with bookworm.

after the installation tacticalagent.service give error "code=exited, status=203/EXEC"

The mesh is working but in the tactical rmm the raspberry don't show up naturally.

I've also noted that with latest tactical update in the mesh all the machines are not in a group and to be able to see the mesh id and path i had to create a new group in order to see the button for install agent.
is it possible to move in some way the machine from the group created with the others machine that are without group ? is not a big of a deal because is working.

Richiesta HTTP inviata, in attesa di risposta... 200 OK
Lunghezza: non specificato [application/octet-stream]
Salvataggio in: «/tmp/meshagent»

/tmp/meshagent [ <=> ] 3,15M 11,3MB/s in 0,3s

2024-06-14 11:57:01 (11,3 MB/s) - «/tmp/meshagent» salvato [3301539]

mkdir: impossibile creare la directory "/opt/tacticalmesh": File già esistente
...Checking for previous installation of "meshagent" [FOUND: /opt/tacticalmesh/meshagent]
-> Stopping Service... [STOPPED]
-> Uninstalling previous installation... [DONE]
-> Checking for secondary agent... [NONE]
...Installing service [DONE]
-> Starting service... [OK]
Agent Compile begin
--2024-06-14 11:57:43-- https://github.com/amidaware/rmmagent/archive/refs/heads/master.zip
Risoluzione di github.com (github.com)... 140.82.121.3
Connessione a github.com (github.com)|140.82.121.3|:443... connesso.
Richiesta HTTP inviata, in attesa di risposta... 302 Found
Posizione: https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master [segue]
--2024-06-14 11:57:43-- https://codeload.github.com/amidaware/rmmagent/zip/refs/heads/master
Risoluzione di codeload.github.com (codeload.github.com)... 140.82.121.10
Connessione a codeload.github.com (codeload.github.com)|140.82.121.10|:443... connesso.
Richiesta HTTP inviata, in attesa di risposta... 200 OK
Lunghezza: 91404 (89K) [application/zip]
Salvataggio in: «/tmp/rmmagent.zip»

/tmp/rmmagent.zip 100%[============================================================================>] 89,26K --.-KB/s in 0,04s

2024-06-14 11:57:44 (2,21 MB/s) - «/tmp/rmmagent.zip» salvato [91404/91404]

Archive: /tmp/rmmagent.zip
3e0366c43eeecb1d59aeb15cf9ec7d9f006e68a1
creating: /tmp/rmmagent-master/
creating: /tmp/rmmagent-master/.github/
creating: /tmp/rmmagent-master/.github/workflows/
inflating: /tmp/rmmagent-master/.github/workflows/ci.yml
inflating: /tmp/rmmagent-master/.gitignore
creating: /tmp/rmmagent-master/.vscode/
inflating: /tmp/rmmagent-master/.vscode/settings.json
inflating: /tmp/rmmagent-master/LICENSE.md
inflating: /tmp/rmmagent-master/README.md
creating: /tmp/rmmagent-master/agent/
inflating: /tmp/rmmagent-master/agent/agent.go
inflating: /tmp/rmmagent-master/agent/agent_unix.go
inflating: /tmp/rmmagent-master/agent/agent_windows.go
inflating: /tmp/rmmagent-master/agent/checkin.go
inflating: /tmp/rmmagent-master/agent/checks.go
inflating: /tmp/rmmagent-master/agent/choco_windows.go
inflating: /tmp/rmmagent-master/agent/embed_darwin.go
inflating: /tmp/rmmagent-master/agent/embed_stub.go
inflating: /tmp/rmmagent-master/agent/eventlog_windows.go
inflating: /tmp/rmmagent-master/agent/install.go
inflating: /tmp/rmmagent-master/agent/install_unix.go
inflating: /tmp/rmmagent-master/agent/install_windows.go
inflating: /tmp/rmmagent-master/agent/patches_windows.go
inflating: /tmp/rmmagent-master/agent/process.go
inflating: /tmp/rmmagent-master/agent/rpc.go
creating: /tmp/rmmagent-master/agent/scripts/
inflating: /tmp/rmmagent-master/agent/scripts/macos_fix_mesh_install.sh
inflating: /tmp/rmmagent-master/agent/services_windows.go
inflating: /tmp/rmmagent-master/agent/software_windows_386.go
inflating: /tmp/rmmagent-master/agent/software_windows_amd64.go
inflating: /tmp/rmmagent-master/agent/svc.go
inflating: /tmp/rmmagent-master/agent/syscall_windows.go
inflating: /tmp/rmmagent-master/agent/tasks_windows.go
inflating: /tmp/rmmagent-master/agent/utils.go
inflating: /tmp/rmmagent-master/agent/wmi_windows.go
inflating: /tmp/rmmagent-master/agent/wua_windows.go
creating: /tmp/rmmagent-master/build/
inflating: /tmp/rmmagent-master/build/rmm.exe.manifest
inflating: /tmp/rmmagent-master/build/setup.iss
inflating: /tmp/rmmagent-master/go.mod
inflating: /tmp/rmmagent-master/go.sum
inflating: /tmp/rmmagent-master/main.go
creating: /tmp/rmmagent-master/shared/
inflating: /tmp/rmmagent-master/shared/types.go
inflating: /tmp/rmmagent-master/versioninfo.json
/usr/local/go/src/internal/abi/abi.go:9:2: package unsafe is not in std (/usr/local/go/src/unsafe)
/usr/local/go/src/reflect/type.go:21:2: package strconv is not in std (/usr/local/go/src/strconv)
/usr/local/go/src/reflect/type.go:22:2: package sync is not in std (/usr/local/go/src/sync)
/usr/local/go/src/reflect/type.go:23:2: package unicode is not in std (/usr/local/go/src/unicode)
/usr/local/go/src/reflect/type.go:24:2: package unicode/utf8 is not in std (/usr/local/go/src/unicode/utf8)
/usr/local/go/src/internal/fmtsort/sort.go:13:2: package sort is not in std (/usr/local/go/src/sort)
/usr/local/go/src/internal/syscall/unix/getrandom.go:10:2: package sync/atomic is not in std (/usr/local/go/src/sync/atomic)
/usr/local/go/src/internal/syscall/unix/at.go:10:2: package syscall is not in std (/usr/local/go/src/syscall)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:13:2: package time is not in std (/usr/local/go/src/time)
/usr/local/go/src/flag/flag.go:95:2: package strings is not in std (/usr/local/go/src/strings)
/usr/local/go/src/encoding/asn1/asn1.go:31:2: package unicode/utf16 is not in std (/usr/local/go/src/unicode/utf16)
/root/go/pkg/mod/github.com/kardianos/[email protected]/service_openrc_linux.go:12:2: package text/template is not in std (/usr/local/go/src/text/template)
/usr/local/go/src/log/slog/handler.go:12:2: package slices is not in std (/usr/local/go/src/slices)
/usr/local/go/src/html/template/context.go:9:2: package text/template/parse is not in std (/usr/local/go/src/text/template/parse)
/root/go/pkg/mod/github.com/hashicorp/[email protected]/hcl/printer/printer.go:7:2: package text/tabwriter is not in std (/usr/local/go/src/text/tabwriter)
cp: impossibile eseguire stat di '/tmp/temp_rmmagent': File o directory non esistente
./rmmagent-linux.sh: riga 234: /tmp/temp_rmmagent: File o directory non esistente
rm: impossibile rimuovere '/tmp/temp_rmmagent': File o directory non esistente

Tactical Agent Install is done

thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.