added exit at the bottom and --no-options for gpg
This commit is contained in:
@@ -139,7 +139,7 @@ if ($zip -or $encrypt) {
|
||||
if ($encrypt) {
|
||||
# encrypt the zip export with gpg
|
||||
Write-Host "Encrypting the backup zip with your bitwarden password..."
|
||||
& $gpg --batch --passphrase "$password" --symmetric --cipher-algo AES256 --digest-algo SHA512 --compression-algo Uncompressed --output "$PSScriptRoot\$zipFilename.gpg" "$PSScriptRoot\$zipFilename"
|
||||
& $gpg --no-options --batch --passphrase "$password" --symmetric --cipher-algo AES256 --digest-algo SHA512 --compression-algo Uncompressed --output "$PSScriptRoot\$zipFilename.gpg" "$PSScriptRoot\$zipFilename"
|
||||
# securely delete the zip export with sdelete
|
||||
Write-Host "Securely deleting the zip file..."
|
||||
& $sdelete -p 25 "$PSScriptRoot\$zipFilename"
|
||||
@@ -148,4 +148,5 @@ if ($zip -or $encrypt) {
|
||||
# remove all the variables
|
||||
Remove-Variable -Name * -ErrorAction SilentlyContinue
|
||||
# logout of bitwaren to ensure the session is destroyed
|
||||
& $bw logout
|
||||
& $bw logout
|
||||
exit 0
|
||||
Reference in New Issue
Block a user