47 lines
1.0 KiB
PowerShell
47 lines
1.0 KiB
PowerShell
param(
|
|
[ValidateSet("freshness","vaultwarden","gitea","paperless","immich")]
|
|
[string]$Mode,
|
|
[switch]$WhatIf
|
|
)
|
|
|
|
$base = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
|
|
switch ($Mode) {
|
|
"freshness" {
|
|
& (Join-Path $base "check-restore-freshness.ps1")
|
|
exit $LASTEXITCODE
|
|
}
|
|
"vaultwarden" {
|
|
if ($WhatIf) {
|
|
& (Join-Path $base "vaultwarden-restore-test.ps1") -WhatIf
|
|
} else {
|
|
& (Join-Path $base "vaultwarden-restore-test.ps1")
|
|
}
|
|
exit $LASTEXITCODE
|
|
}
|
|
"gitea" {
|
|
if ($WhatIf) {
|
|
& (Join-Path $base "gitea-restore-test.ps1") -WhatIf
|
|
} else {
|
|
& (Join-Path $base "gitea-restore-test.ps1")
|
|
}
|
|
exit $LASTEXITCODE
|
|
}
|
|
"paperless" {
|
|
if ($WhatIf) {
|
|
& (Join-Path $base "paperless-restore-test.ps1") -WhatIf
|
|
} else {
|
|
& (Join-Path $base "paperless-restore-test.ps1")
|
|
}
|
|
exit $LASTEXITCODE
|
|
}
|
|
"immich" {
|
|
if ($WhatIf) {
|
|
& (Join-Path $base "immich-restore-test.ps1") -WhatIf
|
|
} else {
|
|
& (Join-Path $base "immich-restore-test.ps1")
|
|
}
|
|
exit $LASTEXITCODE
|
|
}
|
|
}
|