load apps contexts into memory from a JSON file

This commit is contained in:
loki
2019-12-15 14:30:00 +01:00
parent d17f37db12
commit 8b56122542
7 changed files with 116 additions and 29 deletions

29
assets/apps.json Normal file
View File

@@ -0,0 +1,29 @@
{
"env":[
{ "VAR":"VAL", "VAR2":"VAL2" }
],
"apps":[
{
"name":"echo-1",
"output":"output.txt",
"cmd":"sh -c \"echo $VAR\"",
"prep-cmd":[
{ "do":"echo pre-1", "undo":"echo post-1" },
{ "do":"echo pre-2" },
{ "do":"echo pre-3", "undo":"echo post-3" }
]
},
{
"name":"echo-2",
"output":"output.txt",
"cmd":"sleep 10",
"prep-cmd":[
{ "do":"echo pre-1", "undo":"echo post-1" },
{ "do":"echo pre-2" },
{ "do":"echo pre-3", "undo":"echo post-3" }
]
}
]
}