mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-27 15:54:50 +00:00
* Fix licensing on various files * Update packaging to use BUSL-1.1 * Update offset within config_test_helpers.go - Fix a test the same way it's been fixed on main/1.15
21 lines
473 B
Bash
21 lines
473 B
Bash
#!/bin/bash
|
|
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
set -e
|
|
|
|
fail() {
|
|
echo "$1" 1>&2
|
|
exit 1
|
|
}
|
|
|
|
[[ -z "$TOKEN_DIR" ]] && fail "TOKEN_DIR env variable has not been set"
|
|
|
|
# Tar up our token. We have to do this as a superuser because softhsm is owned by root.
|
|
sudo tar -czf token.tgz -C "$TOKEN_DIR" .
|
|
me="$(whoami)"
|
|
sudo chown "$me:$me" token.tgz
|
|
|
|
# Write the value STDOUT as base64 so we can handle binary data as a string
|
|
base64 -i token.tgz
|