Merge pull request #1276 from tlaurion/recovery_fix_when_not_secret_to_shred

This commit is contained in:
tlaurion 2023-01-13 10:45:56 -05:00 committed by GitHub
commit cd269f12c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,9 @@ recovery() {
# Remove any temporary secret files that might be hanging around
# but recreate the directory so that new tools can use it.
shred -n 10 -z -u /tmp/secret/* 2> /dev/null
#safe to always be true. Otherwise "set -e" would make it exit here
shred -n 10 -z -u /tmp/secret/* 2> /dev/null || true
rm -rf /tmp/secret
mkdir -p /tmp/secret