diff options
-rw-r--r-- | configuration/debian/tedge_agent/prerm | 12 | ||||
-rw-r--r-- | configuration/debian/tedge_mapper/prerm | 30 | ||||
-rw-r--r-- | docs/src/howto-guides/002_installation.md | 15 |
3 files changed, 56 insertions, 1 deletions
diff --git a/configuration/debian/tedge_agent/prerm b/configuration/debian/tedge_agent/prerm new file mode 100644 index 00000000..ef5833cd --- /dev/null +++ b/configuration/debian/tedge_agent/prerm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +print_hint() { + echo "$1 is running. Stop $1 before installation, to stop it use: systemctl stop $1" +} + +if systemctl is-active --quiet tedge-agent; then + print_hint "tedge-agent" + exit 1 +fi diff --git a/configuration/debian/tedge_mapper/prerm b/configuration/debian/tedge_mapper/prerm new file mode 100644 index 00000000..4b7a037b --- /dev/null +++ b/configuration/debian/tedge_mapper/prerm @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +print_hint() { + echo "$1 is running. Stop $1 before installation, use: systemctl stop $1" + echo "If you want to start $1 after installation, use: systemctl restart $1" + echo "Make sure that other mappers are not running: systemctl is-active [mapper_name]" + echo "Known mappers are: tedge-mapper-c8y, tedge-mapper-collectd, tedge-mapper-sm-c8y, tedge-mapper-az". +} + +if systemctl is-active --quiet tedge-mapper-c8y; then + print_hint "tedge-mapper-c8y" + exit 1 +fi + +if systemctl is-active --quiet tedge-mapper-sm-c8y; then + print_hint "tedge-mapper-sm-c8y" + exit 1 +fi + +if systemctl is-active --quiet tedge-mapper-collectd; then + print_hint "tedge-mapper-collectd" + exit 1 +fi + +if systemctl is-active --quiet tedge-mapper-az; then + print_hint "tedge-mapper-az" + exit 1 +fi diff --git a/docs/src/howto-guides/002_installation.md b/docs/src/howto-guides/002_installation.md index 1b087c5f..7a3d414c 100644 --- a/docs/src/howto-guides/002_installation.md +++ b/docs/src/howto-guides/002_installation.md @@ -3,9 +3,11 @@ ## Installation with get-thin-edge_io.sh script There are two possibilities to install thin-edge.io, the easiest way is to use the installation script with this command: -``` + +```shell curl -fsSL https://raw.githubusercontent.com/thin-edge/thin-edge.io/main/get-thin-edge_io.sh | sudo sh -s ``` + You can execute that command on your device and it will do all required steps for an initial setup. If you prefer to have a little more control over the installation or the script did not work for you, please go on with the following steps. @@ -33,6 +35,17 @@ sudo apt install mosquitto When all dependencies are in place you can proceed with installation of `thin-edge.io cli` and `thin-edge.io mapper` service. +### Upgrading `thin-edge.io` + +If you already have `thin-edge.io` on your device to upgrade `thin-edge.io` follow the steps below, there is no need to remove old version. + +> Note: To successfully upgrade `thin-edge.io` all thin-edge.io components should be stopped, eg: `tedge-mapper` and `tedge-agent`: +> +> ```shell +> systemctl stop tedge-mapper-c8y +> systemctl stop tedge-agent +> ``` + ### Package download thin-edge.io package is in thin-edge.io repository on GitHub: [thin-edge.io](https://github.com/thin-edge/thin-edge.io/releases). |