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) {
|
if ($encrypt) {
|
||||||
# encrypt the zip export with gpg
|
# encrypt the zip export with gpg
|
||||||
Write-Host "Encrypting the backup zip with your bitwarden password..."
|
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
|
# securely delete the zip export with sdelete
|
||||||
Write-Host "Securely deleting the zip file..."
|
Write-Host "Securely deleting the zip file..."
|
||||||
& $sdelete -p 25 "$PSScriptRoot\$zipFilename"
|
& $sdelete -p 25 "$PSScriptRoot\$zipFilename"
|
||||||
@@ -149,3 +149,4 @@ if ($zip -or $encrypt) {
|
|||||||
Remove-Variable -Name * -ErrorAction SilentlyContinue
|
Remove-Variable -Name * -ErrorAction SilentlyContinue
|
||||||
# logout of bitwaren to ensure the session is destroyed
|
# logout of bitwaren to ensure the session is destroyed
|
||||||
& $bw logout
|
& $bw logout
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user