regnerate nodekeys for datadir transportability

This commit is contained in:
squidbear
2025-03-25 09:41:59 +01:00
parent 8468327236
commit 118b6a5a0e
2 changed files with 8 additions and 2 deletions

View File

@@ -20,4 +20,7 @@ else
echo "Sonic is already initialized."
fi
exec sonicd --cache "${CACHE_GB}000" --datadir "$datadir" "$@"
echo "Generating new Geth node key..."
openssl rand 32 | xxd -p -c 32 | tr -d '\n' > "$datadir/nodekey"
exec sonicd --nodekey "$datadir/nodekey" --cache "${CACHE_GB}000" --datadir "$datadir" "$@"