Skip to content

superops_agent_install_macos.sh

Corey Watson edited this page Dec 1, 2025 · 1 revision

superops_agent_install_macos.sh

Downloads and installs the SuperOps RMM agent on macOS systems.

Overview

Downloads and installs the SuperOps RMM agent on macOS systems using the PKG installer format. This script is designed for automated deployment in RMM environments where the package download URL is provided as an environment variable.

Purpose

Downloads and installs the SuperOps RMM agent on macOS systems using the PKG installer format. This script is designed for automated deployment in RMM environments where the package download URL is provided as an environment variable.

Prerequisites

  • Bash shell
  • macOS operating system
  • Sudo privileges (for installation)
  • Internet access to download agent installer
  • curl command (standard on macOS)
  • PKGURL environment variable must be set by RMM platform

Configuration

Required Inputs

  • PKGURL : (The download URL for the SuperOps agent .pkg installer. This is typically injected by the RMM platform as an environment variable.)

Settings

  • Downloads to /Users/Shared directory (accessible to all users)
  • Uses macOS installer command for PKG installation
  • Requires sudo privileges for installation
  • Includes -dumplog flag for detailed installation logging
  • Cleans up by design (installer handles cleanup)

Behavior

  • Validates that PKGURL environment variable is set
  • Extracts filename from URL using basename
  • Downloads the SuperOps agent PKG to /Users/Shared
  • Installs silently using macOS installer command to root (/)
  • Reports progress and status to stdout
  • Exits with code 0 on success, 1 on failure
  • All-or-nothing: any failure stops the script immediately

Security Notes

  • No secrets are hardcoded in this script
  • Agent URL is provided by RMM environment variable
  • Uses HTTPS for secure download (if URL is HTTPS)
  • Requires sudo elevation for installation
  • PKG is executed with standard macOS installer security

Exit Codes

  • 0 success
  • 1 failure

Example Output

[ INPUT VALIDATION ]
--------------------------------------------------------------
Package URL: https://app.superops.com/downloads/agent.pkg

[ OPERATION ]
--------------------------------------------------------------
Downloading file from https://app.superops.com/downloads/agent.pkg...
File downloaded successfully.
Download location: /Users/Shared/agent.pkg
Starting the installation process...
installer: Package name is SuperOps RMM Agent
installer: Installing at base path /
installer: The install was successful.
Installation process completed successfully.

[ RESULT ]
--------------------------------------------------------------
Status: Success

[ FINAL STATUS ]
--------------------------------------------------------------
SuperOps agent installed successfully

[ SCRIPT COMPLETED ]
--------------------------------------------------------------

Version History

  • 2025-11-02 v1.0.0 Initial migration from SuperOps
    • Converted to Limehawk Style A format (bash)
    • Added comprehensive error handling
    • Added structured console output
    • Added input validation
    • Improved error messages

Links

Clone this wiki locally