Commit 699838dd authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

generate random key to file

parent e5021e16
...@@ -213,7 +213,10 @@ do ...@@ -213,7 +213,10 @@ do
echo "grpc-host: \"0.0.0.0\"" >> $configFile echo "grpc-host: \"0.0.0.0\"" >> $configFile
echo "grpc-port: 38010" >> $configFile echo "grpc-port: 38010" >> $configFile
echo "p2p-host-ip: \"$myIpAddr\"" >> $configFile echo "p2p-host-ip: \"$myIpAddr\"" >> $configFile
private_key=$(openssl rand -hex 32)
echo $private_key > $configPath/private-key
echo "p2p-priv-key: \"/root/private-key\"" >> $configFile
echo "generate net $i private key $private_key"
if [ $i -ne 1 ]; then if [ $i -ne 1 ]; then
echo "peer: [\"${staticPeer}\"]" >> $configFile echo "peer: [\"${staticPeer}\"]" >> $configFile
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment