Skip to content

Commit

Permalink
Merge pull request #8 from thinger-io/develop
Browse files Browse the repository at this point in the history
Fixed installer
  • Loading branch information
bautisflow authored Oct 3, 2023
2 parents 1689c4c + b296165 commit a1b8685
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
MODULE: thinger-iotmp
MODULE: thinger_iotmp
BUILD_TYPE: Release
OPENSSL_ROOT_DIR: /usr/lib/ssl

Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog

## [1.2.0] - 2023-08-17
## [1.2.1] - 2023-09-29
### Changed
- Change module name to thinger\_iotmp

### Fixed
- Installer returning empty device id when network connection set by ppp interface

## [1.2.0] - 2023-09-28
### Added
- Add new THINGER\_STREAMS\_READY state listener
- Install script and service file
Expand All @@ -22,3 +29,8 @@

## [1.0.0] - 2023-09-03
- First version

[1.2.1]: https://github.com/thinger-io/IOTMP-Linux/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/thinger-io/IOTMP-Linux/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/thinger-io/IOTMP-Linux/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/thinger-io/IOTMP-Linux/tag/1.0.0
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.11...3.21)
project(thinger-iotmp)
project(thinger_iotmp)

if (${CMAKE_VERSION} VERSION_GREATER "3.24")
cmake_policy(SET CMP0135 NEW)
Expand Down
6 changes: 5 additions & 1 deletion install/install_thinger_iotmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,16 @@ if [ ! -f "$config_filename" ]; then
fi

MAC=`ip link show $(ip route show default | awk '/default/ {print $5}') | awk '/link\/ether/ {print $2}' | sed 's/://g' | tr '[:lower:]' '[:upper:]'`
DEVICE_KEY=`echo $MAC | base64 -d | openssl sha256 -hex -mac HMAC -macopt hexkey:$KEY_HEX | awk '{print $2}'`
if [ -z "${MAC+x}" ]; then
MAC=`ip link show $(ip -o link | grep ether | awk '{ print $2}' | sed 's/://g') | awk '/link\/ether/ {print $2}' | sed 's/://g' | tr '[:lower:]' '[:upper:]'`
fi

if [ -z "${device+x}" ]; then
device="$prefix"_"$MAC"
fi

DEVICE_KEY=`echo $device | base64 -d | openssl sha256 -hex -mac HMAC -macopt hexkey:$KEY_HEX | awk '{print $2}'`

cat > "$config_dir/$config_filename" << EOF
username=$username
device=$device
Expand Down

0 comments on commit a1b8685

Please sign in to comment.