"Remove presentation files and related scripts"

This commit is contained in:
2025-05-26 11:18:10 +02:00
parent 32dfeb9e27
commit a201c96d13
21 changed files with 29 additions and 2134 deletions

View File

@@ -41,7 +41,8 @@ function Test-Command {
try {
Get-Command $Command -ErrorAction Stop | Out-Null
return $true
} catch {
}
catch {
return $false
}
}
@@ -63,7 +64,8 @@ function Exec-Command {
Write-Host "✗ Fehler beim Ausführen des Befehls. Exit-Code: $LASTEXITCODE" -ForegroundColor $colors.Error
return $false
}
} catch {
}
catch {
Write-Host "✗ Fehler: $_" -ForegroundColor $colors.Error
return $false
}
@@ -80,15 +82,14 @@ function Get-LocalIPAddress {
function Test-Dependencies {
Write-Host "Prüfe Abhängigkeiten..." -ForegroundColor $colors.Info
$dependencies = @{
"python" = "Python (3.6+)"
"pip" = "Python Package Manager"
"docker" = "Docker"
"docker-compose" = "Docker Compose"
"node" = "Node.js"
"npm" = "Node Package Manager"
"openssl" = "OpenSSL"
}
$dependencies = @{}
$dependencies["python"] = "Python (3.6+)"
$dependencies["pip"] = "Python Package Manager"
$dependencies["docker"] = "Docker"
$dependencies["docker-compose"] = "Docker Compose"
$dependencies["node"] = "Node.js"
$dependencies["npm"] = "Node Package Manager"
$dependencies["openssl"] = "OpenSSL"
$allInstalled = $true
@@ -151,7 +152,8 @@ function Setup-Hosts {
try {
$hostsContent | Set-Content -Path $hostsFile -Force
Write-Host "Konfiguration abgeschlossen!" -ForegroundColor $colors.Success
} catch {
}
catch {
Write-Host "Fehler beim Schreiben der Hosts-Datei: $_" -ForegroundColor $colors.Error
}
@@ -330,9 +332,11 @@ create_self_signed_cert('$frontendCertFile', '$frontendKeyFile', '$frontendHostn
try {
python $tempScriptPath
Write-Host "SSL-Zertifikate erfolgreich erstellt!" -ForegroundColor $colors.Success
} catch {
}
catch {
Write-Host "Fehler beim Erstellen der SSL-Zertifikate: $_" -ForegroundColor $colors.Error
} finally {
}
finally {
# Temporäres Skript löschen
Remove-Item -Path $tempScriptPath -Force
}
@@ -544,7 +548,10 @@ function Clean-OldScripts {
"setup_hosts.ps1",
"setup_hosts_copy.ps1",
"generate_ssl_certs.ps1",
"generate_ssl_certs_copy.ps1"
"generate_ssl_certs_copy.ps1",
"setup_ssl.sh",
"setup_hosts.sh",
"generate_ssl_certs.sh"
)
Write-Host "Folgende Skripte werden gelöscht:" -ForegroundColor $colors.Info
@@ -563,7 +570,8 @@ function Clean-OldScripts {
try {
Remove-Item -Path $script -Force
Write-Host "$script wurde gelöscht." -ForegroundColor $colors.Success
} catch {
}
catch {
$errorMessage = $_.Exception.Message
Write-Host "✗ Fehler beim Löschen von $script`: $errorMessage" -ForegroundColor $colors.Error
}
@@ -572,7 +580,8 @@ function Clean-OldScripts {
Write-Host ""
Write-Host "Bereinigung abgeschlossen." -ForegroundColor $colors.Success
} else {
}
else {
Write-Host "Bereinigung abgebrochen." -ForegroundColor $colors.Warning
}
@@ -593,9 +602,8 @@ function Show-MainMenu {
Write-Host "6. Alte Skripte bereinigen" -ForegroundColor $colors.Command
Write-Host "Q. Beenden" -ForegroundColor $colors.Command
Write-Host ""
Write-Host "Wählen Sie eine Option (1-6, Q):" -ForegroundColor $colors.Info -NoNewline
$choice = Read-Host " "
$choice = Read-Host "Wählen Sie eine Option (1-6, Q)"
switch ($choice) {
"1" {