Files
nanoreth/etc/generate-jwt.sh
2023-07-05 14:49:42 +00:00

11 lines
464 B
Bash
Executable File

# Borrowed from EthStaker's prepare for the merge guide
# See https://github.com/remyroy/ethstaker/blob/main/prepare-for-the-merge.md#configuring-a-jwt-token-file
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
mkdir -p ${SCRIPT_DIR}/jwttoken
if [[ ! -f ${SCRIPT_DIR}/jwttoken/jwt.hex ]]
then
openssl rand -hex 32 | tr -d "\n" | tee > ${SCRIPT_DIR}/jwttoken/jwt.hex
else
echo "${SCRIPT_DIR}/jwttoken/jwt.hex already exists!"
fi