Skip to content

Commit cd19946

Browse files
Added module: command-dispatcher, allows shell commands to be run
Ticket: CFE-4627 Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
1 parent 7ccdba3 commit cd19946

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
This module enables the running of shell commands based on input from the Mission-Portal's build page or `cfbs input`.
2+
3+
Internally these commands are ran using the `"useshell"`-promise based on the `condition`-variable.
4+
5+
**Note:**
6+
7+
---
8+
9+
**Usage:**
10+
11+
* `command` - The command to run.
12+
13+
* `condition` - Condition for running. Use a class expression (e.g., `linux|bsd`). Defaults to `"any"`
14+
15+
* `ifelapsed` - Number of minutes between assessments. Defaults to 5 minutes.
16+
17+
E.g.
18+
```json
19+
...
20+
{
21+
"command": "echo \"Hello World\"",
22+
"condition": "linux",
23+
"ifelapsed": "5"
24+
},
25+
...
26+
```
27+
Would echo "Hello world" on every linux device with 5 minute intervals.
28+
29+
---
30+
31+
## Contribute
32+
33+
Feel free to open pull requests to expand this documentation, add features or fix problems.
34+
You can also pick up an existing task or file an issue in [our bug tracker](https://tracker.mender.io/issues/).
35+
36+
## License
37+
38+
This software is licensed under the MIT License. See LICENSE in the root of the repository for the full license text.

0 commit comments

Comments
 (0)