Merge branch 'main' into main

This commit is contained in:
Netvolt Serviços Digitais
2025-01-16 20:55:59 +00:00
committed by GitHub
2 changed files with 20 additions and 25 deletions

View File

@@ -1,41 +1,41 @@
# rmmagent-script
Script for one-line installing and update of tacticalRMM agent
Script for one-line installation and updating of the 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)
> Scripts are now available for x64, x86, arm64, and armv6. However, only x64 and i386 have been tested on Debian 11 and Debian 10 on bare metal, VMs (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 !
Scripts for other platforms will be available later as I adapt the script to other platforms.
Feel free to adapt the script and submit changes to 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'
Make executable after downloading with: '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:
Ubuntu uses the Wayland display manager instead of the regular X11 server. This causes MeshCentral to show a blank screen, preventing login, viewing, or controlling the client.
Using the command lines below should solve the problem:
```
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. <
> If you encounter a 'file not found' error, you are likely using Ubuntu 19 or earlier. 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:
To install the agent, launch the script with this argument:
```bash
./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:
The arguments are:
2. System type
@@ -54,12 +54,12 @@ The argument are:
5. 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.
Can be viewed by hovering over the name of the client in the dashboard.
6. 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.
Can be viewed by hovering over the name of the site in the dashboard.
7. Auth Key
@@ -77,14 +77,14 @@ The argument are:
## Update
Simply launch the script that match your system with *update* as argument.
Simply launch the script with *update* as argument.
```bash
./rmmagent-linux.sh update
```
## Uninstall
To uninstall agent launch the script with this arguement:
To uninstall the agent, launch the script with this argument:
```bash
./rmmagent-linux.sh uninstall 'Mesh FQDN' 'Mesh ID'
@@ -100,6 +100,7 @@ The argument are:
3. Mesh ID
The ID given by mesh for installing new agent.
Go to mesh.example.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.
@@ -109,5 +110,5 @@ The argument are:
```
### WARNING
- You should **only** attempt this if the agent removal feaure on TacticalRMM is not working.
- You should **only** attempt this if the agent removal feature 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.

View File

@@ -1,10 +1,4 @@
#!/bin/bash
check_zip=$(which unzip 2> /dev/null)
if [[ $check_zip == "" || $check_zip =~ .*"no unzip".* ]]; then
echo "unzip could not be found. Please install unzip."
exit 0
fi
if [[ $1 == "" ]]; then
echo "First argument is empty !"
echo "Type help for more information"
@@ -127,7 +121,7 @@ rmm_agent_type=$8
mesh_fqdn=$2
mesh_id=$3
## Setting Go verison to be installed
go_version="1.21.5"
go_version="1.21.6"
go_url_amd64="https://go.dev/dl/go$go_version.linux-amd64.tar.gz"
go_url_x86="https://go.dev/dl/go$go_version.linux-386.tar.gz"
@@ -198,9 +192,9 @@ function go_install() {
function agent_compile() {
## Compiling and installing tactical agent from github
echo "Agent Compile begin"
wget -O /tmp/rmmagent.zip "https://github.com/amidaware/rmmagent/archive/refs/heads/master.zip"
unzip /tmp/rmmagent -d /tmp/
rm /tmp/rmmagent.zip
wget -O /tmp/rmmagent.tar.gz "https://github.com/amidaware/rmmagent/archive/refs/heads/master.tar.gz"
tar -xf /tmp/rmmagent.tar.gz -C /tmp/
rm /tmp/rmmagent.tar.gz
cd /tmp/rmmagent-master
case $system in
amd64)