Improves console output for certain commands

This commit is contained in:
Lord Hepipud 2020-05-22 13:42:23 +02:00
parent 882ce624a0
commit 987a52c418
3 changed files with 5 additions and 5 deletions

View file

@ -194,7 +194,7 @@ function Test-IcingaAgentCertificates()
}
}
Write-IcingaConsoleNotice 'Icinga host certificates are present and valid. No generation required.';
Write-IcingaConsoleNotice 'Icinga host certificates are present and valid. No generation required';
return $TRUE;
}

View file

@ -11,20 +11,20 @@ function Uninstall-IcingaAgent()
return;
}
Write-IcingaConsoleNotice 'Removing current installed Icinga Agent';
Write-IcingaConsoleNotice 'Removing current Icinga Agent';
Stop-IcingaService 'icinga2';
$Uninstaller = Start-IcingaProcess -Executable 'MsiExec.exe' -Arguments ([string]::Format('{0} /q', $IcingaData.Uninstaller)) -FlushNewLine;
if ($Uninstaller.ExitCode -ne 0) {
Write-IcingaConsoleError ([string]::Format('Failed to remove Icinga 2 Agent: {0}{1}', $Uninstaller.Message, $Uninstaller.Error));
Write-IcingaConsoleError ([string]::Format('Failed to remove Icinga Agent: {0}{1}', $Uninstaller.Message, $Uninstaller.Error));
return $FALSE;
}
if ($RemoveDataFolder) {
[string]$IcingaProgramData = Join-Path -Path $Env:ProgramData -ChildPath 'icinga2';
Write-IcingaConsoleNotice -Message 'Removing Icinga 2 directoy from ProgramData: "{0}"' -Objects $IcingaProgramData;
Write-IcingaConsoleNotice -Message 'Removing Icinga Agent directory: "{0}"' -Objects $IcingaProgramData;
if ((Remove-ItemSecure -Path $IcingaProgramData -Recurse -Force) -eq $FALSE) {
return $FALSE;
}

View file

@ -4,7 +4,7 @@ function Move-IcingaAgentDefaultConfig()
$BackupFile = Join-Path -Path $ConfigDir -ChildPath 'ps_backup\backup_executed.key';
if ((Test-Path $BackupFile)) {
Write-IcingaConsoleNotice 'A backup of your default configuration is not required. A backup was already made.';
Write-IcingaConsoleNotice 'A backup of your default configuration is not required. A backup was already made';
return;
}