Skip to content

Commit

Permalink
Implement compatibility for spin-down-script with the key-included pe…
Browse files Browse the repository at this point in the history
…er_list
  • Loading branch information
Nghi Nguyen committed Jan 24, 2024
1 parent cf329e6 commit ad59da8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions devops/deploy/spin-down-script.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

PORT_LIST="port_list.txt"
PORT_LIST="peer_list.txt"
# Now fully implemented spinning down through the port_list.txt
IP=127.0.0.1
declare -a PORTS=()
while IFS= read -r line
do
PORTS+=("$line")
PORTS+=("$(echo $line | awk -F, '{print $2}')")
done < "$PORT_LIST"

# Iterate through the list, killing each controlling process while looping
Expand Down
2 changes: 1 addition & 1 deletion devops/deploy/spin-up-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ do

# Handling putting the port information and the keys into the peer list
echo "Starting on port $port"
echo "${COUNT} ,${port} ,${private_key} ,${public_key}" >> $PEER_FILE
echo "${COUNT},${port},${private_key},${public_key}" >> $PEER_FILE

# Calling server
python3 -m sample_module.udp_server ${port} &
Expand Down

0 comments on commit ad59da8

Please sign in to comment.