Initialer Import der Synology Scripts

This commit is contained in:
root
2026-08-05 08:43:57 +02:00
commit 5e32a7c411
404 changed files with 79932 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
function Invoke-Retry {
param(
[scriptblock]$Action,
[int]$Retries = 3,
[int]$DelaySeconds = 5,
[string]$Name = "Operation"
)
```
for ($i = 1; $i -le $Retries; $i++) {
try {
return & $Action
}
catch {
Write-Log "$Name failed ($i/$Retries): $($_.Exception.Message)" -Level WARN
if ($i -eq $Retries) { throw }
Start-Sleep $DelaySeconds
}
}
```
}