$token = Get-Content 'c:\Users\Administrator\.ssh\coolify-redbull-token'
$baseUrl = "https://redbull.rede5.com.br/api/v1"
$serviceUuid = "cs80o4sgo440gkwkogo4c44k"

Write-Host "Stopping service..."
$stopUrl = "$baseUrl/services/$serviceUuid/stop"
Invoke-RestMethod -Uri $stopUrl -Headers @{Authorization = "Bearer $token" } -Method Post | Out-Null
Write-Host "Service stop requested."

Start-Sleep -Seconds 15

Write-Host "Starting service..."
$startUrl = "$baseUrl/services/$serviceUuid/start"
Invoke-RestMethod -Uri $startUrl -Headers @{Authorization = "Bearer $token" } -Method Post | Out-Null
Write-Host "Service start requested."
