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:
+4
-2
@@ -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."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user