-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from thin-edge/update-0.13.1
update to thin-edge.io 0.13.1
- Loading branch information
Showing
6 changed files
with
4 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,2 @@ | ||
#!/command/with-contenv sh | ||
set -e | ||
|
||
# FIXME: Remove when https://github.com/thin-edge/thin-edge.io/issues/2391 is resolved | ||
# In the future the the bind and client host will be decoupled and the http.client.host will | ||
# accept hostnames (removing the need to lookup the ip address) | ||
if [ -n "$FIXME_TEDGE_HTTP_CLIENT_HOST" ]; then | ||
# | ||
# Configure mapper to point to correct ip address of tedge-agent http server | ||
# | ||
FIXME_TEDGE_HTTP_CLIENT_HOST_IP=$(getent hosts "$FIXME_TEDGE_HTTP_CLIENT_HOST" | cut -d' ' -f1) | ||
|
||
if [ -n "$FIXME_TEDGE_HTTP_CLIENT_HOST_IP" ]; then | ||
echo "Setting http.bind.address address to $FIXME_TEDGE_HTTP_CLIENT_HOST_IP ($FIXME_TEDGE_HTTP_CLIENT_HOST)" >&2 | ||
tedge config set http.bind.address "$FIXME_TEDGE_HTTP_CLIENT_HOST_IP" | ||
fi | ||
fi | ||
|
||
# FIXME: Remove once https://github.com/thin-edge/thin-edge.io/issues/2389 is resolved | ||
# A manual registration before the service starts up seems to prevent duplicate registration messages | ||
TOPIC_ROOT=$(tedge config get mqtt.topic_root) | ||
TOPIC_ID=$(tedge config get mqtt.device_topic_id) | ||
|
||
if [ "$REGISTER_DEVICE" = 1 ]; then | ||
case "$TOPIC_ID" in | ||
device/main//) | ||
# Don't register when it is the main device | ||
;; | ||
*) | ||
echo "manually registering child-device" >&2 | ||
name=$(echo "$TOPIC_ID" | cut -d/ -f2) | ||
body=$(printf '{"@type":"child-device","name":"%s"}' "$name") | ||
tedge mqtt pub -r "$TOPIC_ROOT/$TOPIC_ID" "$body" | ||
sleep 1 | ||
;; | ||
esac | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
bf24044
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results