-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start service on post installation and stop service on pre-removal
- Loading branch information
1 parent
a0e9090
commit 407b170
Showing
7 changed files
with
32 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
#!/bin/sh | ||
|
||
# enable services (only if the binary is found) | ||
command -V tedge-agent >/dev/null 2>&1 && tedgectl enable tedge-agent | ||
command -V tedge-mapper-c8y >/dev/null 2>&1 && tedgectl enable tedge-mapper-c8y | ||
command -V c8y-configuration-plugin >/dev/null 2>&1 && tedgectl enable c8y-configuration-plugin | ||
command -V c8y-log-plugin >/dev/null 2>&1 && tedgectl enable c8y-log-plugin | ||
command -V c8y-firmware-plugin >/dev/null 2>&1 && tedgectl enable c8y-firmware-plugin | ||
# enable and start services (only if the binary is found) | ||
if command -V tedge-agent >/dev/null 2>&1; then | ||
tedgectl enable tedge-agent | ||
tedgectl start tedge-agent | ||
fi | ||
|
||
if command -V tedge-mapper-c8y >/dev/null 2>&1; then | ||
tedgectl enable tedge-mapper-c8y | ||
tedgectl start tedge-mapper-c8y | ||
fi | ||
|
||
if command -V c8y-configuration-plugin >/dev/null 2>&1; then | ||
tedgectl enable c8y-configuration-plugin | ||
tedgectl start c8y-configuration-plugin | ||
fi | ||
|
||
if command -V c8y-log-plugin >/dev/null 2>&1; then | ||
tedgectl enable c8y-log-plugin | ||
tedgectl start c8y-log-plugin | ||
fi | ||
|
||
if command -V c8y-firmware-plugin >/dev/null 2>&1; then | ||
tedgectl enable c8y-firmware-plugin | ||
tedgectl start c8y-firmware-plugin | ||
fi |
This file was deleted.
Oops, something went wrong.
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
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