Skip to content

Commit

Permalink
Add manual setting of nodeid
Browse files Browse the repository at this point in the history
  • Loading branch information
benhylau committed Jul 15, 2019
1 parent 71f234c commit 620a18b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions prodnet/espressobin/install
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
set -e

NODE_TYPE=$1
NODE_ID=$2

# Remove user me from sudo group
sudo deluser me sudo || true

# Randomize nodeid segment between 10:255
nodeid=$((RANDOM % 246 + 10))
# Set nodeid
if [[ -z "$NODE_ID" ]]; then
# Randomize nodeid segment between 10:255
nodeid=$((RANDOM % 246 + 10))
else
nodeid=$NODE_ID
fi

# Identify node type
if [[ "$NODE_TYPE" == "edge" ]] || [[ "$NODE_TYPE" == "relay" ]] || [[ "$NODE_TYPE" == "gateway" ]]; then
Expand Down

0 comments on commit 620a18b

Please sign in to comment.