Add optional configuration options for additional parameters to restic calls, $AdditionalParameters and $SelfUpdateParameters and make self update of restic binary configurable via $AllowResticSelfUpdate config option

This commit is contained in:
Joerg Reuter
2024-03-17 16:26:51 +01:00
parent f759630532
commit 0e8262ab05
3 changed files with 23 additions and 16 deletions
+4 -2
View File
@@ -18,7 +18,9 @@ if(-not (Test-Path $ResticExe)) {
}
# Invoke restic self-update to check for a newer version
& $ResticExe self-update
if($AllowResticSelfUpdate -eq $true) {
& $ResticExe $SelfUpdateParameters self-update
}
# Create log directory if it doesn't exit
if(-not (Test-Path $LogPath)) {
@@ -32,7 +34,7 @@ if(-not (Test-Path $LocalExcludeFile)) {
}
# Initialize the restic repository
& $ResticExe --verbose init
& $ResticExe $AdditionalParameters --verbose init
if($?) {
Write-Output "[[Init]] Repository successfully initialized."
}