Skip to content

Commit

Permalink
Add node information
Browse files Browse the repository at this point in the history
  • Loading branch information
mortzu committed Jul 26, 2019
1 parent 30619cc commit 6537544
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6
0.7
7 changes: 7 additions & 0 deletions gatemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ else
CHECK_SUFFIX='-nonroot'
fi

# Get node informations
NODE_INFO="$(curl -s -f http://node.ffhb.de/cgi-bin/nodeinfo)"
NODE_HOSTNAME="$(jq -r .hostname <<<"$NODE_INFO")"
NODE_ID="$(jq -r .node_id <<<"$NODE_INFO")"

# Get version
GATEMON_VERSION="$(<$(dirname "$0")/VERSION)"

Expand All @@ -116,6 +121,8 @@ cat >"$TMP_FILE" <<EOF
name: ${GATEMON_NAME}
provider: ${GATEMON_PROVIDER}
version: ${GATEMON_VERSION}
node-hostname: ${NODE_HOSTNAME}
node-id: ${NODE_ID}
vpn-servers:
EOF

Expand Down

0 comments on commit 6537544

Please sign in to comment.