From ba76e3022e7c4a996af393798eb0a367453be6f2 Mon Sep 17 00:00:00 2001 From: Simon Halvorsen Date: Mon, 23 Feb 2026 14:12:06 +0100 Subject: [PATCH] Added module: command-dispatcher, allows shell commands to be run Ticket: CFE-4627 Signed-off-by: Simon Halvorsen --- management/command-dispatcher/README.md | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 management/command-dispatcher/README.md diff --git a/management/command-dispatcher/README.md b/management/command-dispatcher/README.md new file mode 100644 index 0000000..15e0e2b --- /dev/null +++ b/management/command-dispatcher/README.md @@ -0,0 +1,39 @@ +This module enables the running of shell commands based on input from the Mission-Portal's build page or `cfbs input`. + +Internally these commands are ran using the `"useshell"`-promise based on the `condition`-variable. + +**Note:** +The commands are dispatched with root-privilege (uid=0) and a timeout-window of 300 seconds. + +--- + +**Usage:** + +* `command` - The command to run. + +* `condition` - Condition for running. Use a class expression (e.g., `linux|bsd`). Defaults to `"any"` + +* `ifelapsed` - Number of minutes between assessments. Defaults to 5 minutes. + +E.g. +```json +... +{ +"command": "echo \"Hello World\"", +"condition": "linux", +"ifelapsed": "5" +}, +... +``` +Would echo "Hello world" on every linux device with 5 minute intervals. + +--- + +## Contribute + +Feel free to open pull requests to expand this documentation, add features or fix problems. +You can also pick up an existing task or file an issue in [our bug tracker](https://tracker.mender.io/issues/). + +## License + +This software is licensed under the MIT License. See LICENSE in the root of the repository for the full license text.