#!/bin/bash # GitHub script URL GITHUB_URL="https://gittea.dannydekooker.nl/Dcomputers/TacticalRMM_Scripts/raw/branch/main/Supporting_scripts/Linux%20-%20Update%20TRMM%20agent.sh" # Destination directory DEST_DIR="/tmp" # Name of the script file SCRIPT_FILE="trmm-agentupdate.sh" # Download the script from GitHub wget -O "$DEST_DIR/$SCRIPT_FILE" "$GITHUB_URL" if [ $? -eq 0 ]; then echo "Script downloaded successfully." # Schedule the script to run after 2 minutes echo "bash $DEST_DIR/$SCRIPT_FILE update amd64" | at now + 2 minutes echo "Script scheduled to run after 2 minutes." else echo "Failed to download the script from GitHub." fi