2
0

Update Supporting_scripts/Linux - Update TRMM agent.sh

This commit is contained in:
2023-09-06 15:01:46 +02:00
parent 60722d8131
commit 19b8b919fa

View File

@@ -1,5 +1,20 @@
#!/bin/bash #!/bin/bash
#Source: https://github.com/netvolt/LinuxRMM-Script/blob/main/rmmagent-linux.sh # Usage: "./Linux - Update TRMM agent.sh" update amd64
#
# Description:
# This script is used from inside of Tactical RMM instances to schedule an update of a linux agent.
# The script will download the update script and schedule it to run after 2 minutes,
# this is done because the update script needs to stop and replace the agent files on the host.
#
# Arguments:
# update - Used to specify that the agent needs to be updated
# [SystemType] - Specify what type of system the agent needs to be updated on ('amd64' 'x86' 'arm64' 'armv6')
#
# Author: D. de Kooker (info@dcomputers.nl)
# Sources: https://github.com/netvolt/LinuxRMM-Script/blob/main/rmmagent-linux.sh
# Changelog:
# 06-09-2023 - Change the script from source to exclude the Install and uninstall part,
# adjusted it so it could be run on it's own (or by scheduled task script with TRMM) to update a linux agent.
check_zip=$(which unzip 2> /dev/null) check_zip=$(which unzip 2> /dev/null)
if [[ $check_zip == "" || $check_zip =~ .*"no unzip".* ]]; then if [[ $check_zip == "" || $check_zip =~ .*"no unzip".* ]]; then