10 lines
398 B
Bash
10 lines
398 B
Bash
#!/bin/bash
|
|
|
|
FILENAME=$1
|
|
TMPFILE=$(mktemp /tmp/archive_file.XXXXXXXXXX)
|
|
BUCKET=$(cat /etc/gcloud/gcloud.json | jq -r .bucket)
|
|
NODE=$(cat /etc/archive/archive.json | jq -r .node_id)
|
|
MASTERKEY=$(cat /etc/gocryptfs/masterkey)
|
|
|
|
gsutil cat "gs://$BUCKET/$NODE$FILENAME" > "$TMPFILE"
|
|
/opt/gocryptfs-inspect/gocryptfs.py --aessiv --config=/etc/gocryptfs/gocryptfs.conf --masterkey="$MASTERKEY" "$TMPFILE"
|