Remove fixed username references #7

Merged
dboreham merged 1 commits from dboreham/remove-fixed-username into main 2024-08-06 13:40:22 +00:00

View File

@ -23,7 +23,7 @@ for (( i=1 ; i<=$node_count ; i++ ));
do do
node_name=${machine_name_prefix}-${i} node_name=${machine_name_prefix}-${i}
node_host_name=${node_name}.${machine_domain} node_host_name=${node_name}.${machine_domain}
gentx_file_name=$(ssh ${ssh_user}@${node_host_name} ls /home/laconic/${gentx_dir} | head -1) gentx_file_name=$(ssh ${ssh_user}@${node_host_name} ls ${gentx_dir} | head -1)
node_id=$(echo ${gentx_file_name} | sed -e 's/^gentx-//' -e 's/.json$//') node_id=$(echo ${gentx_file_name} | sed -e 's/^gentx-//' -e 's/.json$//')
node_ip=$(dig +short ${node_host_name}) node_ip=$(dig +short ${node_host_name})
peer=${node_id}@${node_ip}:${p2p_port} peer=${node_id}@${node_ip}:${p2p_port}
@ -42,8 +42,8 @@ do
node_name=${machine_name_prefix}-${i} node_name=${machine_name_prefix}-${i}
node_host_name=${node_name}.${machine_domain} node_host_name=${node_name}.${machine_domain}
echo "Copying ${gentx_dir} on ${node_name} to ${local_gentx_dir}" echo "Copying ${gentx_dir} on ${node_name} to ${local_gentx_dir}"
scp laconic@${node_host_name}:~/${gentx_dir}/* ${local_gentx_dir} scp ${ssh_user}@${node_host_name}:~/${gentx_dir}/* ${local_gentx_dir}
scp laconic@${node_host_name}:~/${genesis_json_file} ${local_gentx_dir}/${node_name}-genesis.json scp ${ssh_user}@${node_host_name}:~/${genesis_json_file} ${local_gentx_dir}/${node_name}-genesis.json
done done
# Extract the peer node validator addresses from their genesis.json files # Extract the peer node validator addresses from their genesis.json files
@ -61,9 +61,9 @@ echo "Copying gentx files to node 1"
node_1_host_name=${machine_name_prefix}-1.${machine_domain} node_1_host_name=${machine_name_prefix}-1.${machine_domain}
ssh ${ssh_user}@${node_1_host_name} rm -rf ${local_gentx_dir} ssh ${ssh_user}@${node_1_host_name} rm -rf ${local_gentx_dir}
ssh ${ssh_user}@${node_1_host_name} mkdir ${local_gentx_dir} ssh ${ssh_user}@${node_1_host_name} mkdir ${local_gentx_dir}
scp ${local_gentx_dir}/gentx-* laconic@${node_1_host_name}:~/${local_gentx_dir} scp ${local_gentx_dir}/gentx-* ${ssh_user}@${node_1_host_name}:~/${local_gentx_dir}
gentx_file_list=$(ssh laconic@${node_1_host_name} ls -m ${local_gentx_dir}/gentx-*) gentx_file_list=$(ssh ${ssh_user}@${node_1_host_name} ls -m ${local_gentx_dir}/gentx-*)
echo "Node 1 now has: ${gentx_file_list}" echo "Node 1 now has: ${gentx_file_list}"
gentx_files=$(echo ${gentx_file_list} | tr -d ' ' | tr -d '\n') gentx_files=$(echo ${gentx_file_list} | tr -d ' ' | tr -d '\n')