summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-02 12:04:50 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-02 12:04:50 +0100
commitb8471ce80da8a0b66e64ca812598c91f43eeefae (patch)
treed7fd9c7db0debbb99e6087ddf3ac8411b2540816
parent96e8159015f9bd4d5dc123be769ab55343e0ce12 (diff)
downloadbin-b8471ce80da8a0b66e64ca812598c91f43eeefae.tar.gz
bin-b8471ce80da8a0b66e64ca812598c91f43eeefae.tar.xz
luks-header-backup: encrypt backup file
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xluks-header-backup6
1 files changed, 5 insertions, 1 deletions
diff --git a/luks-header-backup b/luks-header-backup
index 4219df7..38c0e7f 100755
--- a/luks-header-backup
+++ b/luks-header-backup
@@ -7,7 +7,11 @@ test -n "$host"
dev=$1
dev_basename=${dev##*/}
+outfile="$HOME/$host-${dev_basename}-luks-header.bak"
test -n "$dev_basename"
-cryptsetup --header-backup-file=$HOME/$host-${dev_basename}-luks-header.bak luksHeaderBackup $dev
+cryptsetup --header-backup-file="$outfile" luksHeaderBackup $dev
+gpg --batch -r 0x6D1655C14CE1C13E -e "$outfile"
+rm "$outfile"
+chown flo:users "$outfile.gpg"