mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-13 00:34:43 +00:00
Fix: add Windows uninstall command support for unified agent
The UI only showed a bash uninstall command which doesn't work on Windows. Added PULSE_UNINSTALL env var support to install.ps1 and updated the UI to display platform-specific uninstall commands for both Linux/macOS and Windows. Related to #1176
This commit is contained in:
parent
900e05025a
commit
c2de5f7f4c
1 changed files with 6 additions and 0 deletions
|
|
@ -2,6 +2,9 @@
|
|||
# Usage:
|
||||
# irm http://pulse/install.ps1 | iex
|
||||
# $env:PULSE_URL="..."; $env:PULSE_TOKEN="..."; irm ... | iex
|
||||
#
|
||||
# Uninstall:
|
||||
# $env:PULSE_UNINSTALL="true"; irm http://pulse/install.ps1 | iex
|
||||
|
||||
param (
|
||||
[string]$Url = $env:PULSE_URL,
|
||||
|
|
@ -59,6 +62,9 @@ if (-not $PSBoundParameters.ContainsKey('EnableKubernetes') -and -not [string]::
|
|||
if (-not $PSBoundParameters.ContainsKey('Insecure') -and -not [string]::IsNullOrWhiteSpace($env:PULSE_INSECURE_SKIP_VERIFY)) {
|
||||
$Insecure = Parse-Bool $env:PULSE_INSECURE_SKIP_VERIFY $Insecure
|
||||
}
|
||||
if (-not $PSBoundParameters.ContainsKey('Uninstall') -and -not [string]::IsNullOrWhiteSpace($env:PULSE_UNINSTALL)) {
|
||||
$Uninstall = Parse-Bool $env:PULSE_UNINSTALL $Uninstall
|
||||
}
|
||||
|
||||
# --- Administrator Check ---
|
||||
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue