summaryrefslogtreecommitdiffstats
path: root/configuration
diff options
context:
space:
mode:
authorLukasz Woznicki <75632179+makr11st@users.noreply.github.com>2021-11-08 21:47:40 +0000
committerGitHub <noreply@github.com>2021-11-08 21:47:40 +0000
commitc39fa334f73f933534430483022f2603de975803 (patch)
treeb20357398cb10cdc94b7f1476ade0656ceb45a01 /configuration
parent4c400d735923a3fbca600cff0514316ed8115141 (diff)
[CIT-663] Add hints for upgrade of thin-edge.io (#557)
* Add note in installation doc about upgradingg * Add prerm scripts with hints to stop running mappers Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
Diffstat (limited to 'configuration')
-rw-r--r--configuration/debian/tedge_agent/prerm12
-rw-r--r--configuration/debian/tedge_mapper/prerm30
2 files changed, 42 insertions, 0 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