Skip to content

Commit bae2036

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 bae2036

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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
4+
on the `condition`-variable.
5+
6+
---
7+
8+
**Usage:**
9+
10+
`command` - The command to run
11+
12+
`condition` - Condition for running e.g `linux`, `debian`, etc. Defaults to `"any"`
13+
14+
`ifelapsed` - Number of minutes between assessments. Defaults to 5
15+
16+
E.g.
17+
```
18+
...
19+
{
20+
"command": "echo \"Hello World\"",
21+
"condition": "linux",
22+
"ifelapsed": "5"
23+
},
24+
...
25+
```
26+
Would echo "Hello world" on every linux devices in 5 minute intervals.
27+
28+

0 commit comments

Comments
 (0)