load apps contexts into memory from a JSON file

This commit is contained in:
loki 2019-12-15 14:30:00 +01:00
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" }
]
}
]
}

View file

@ -12,7 +12,7 @@
unique_id = 03904e64-51da-4fb3-9afd-a9f7ff70fea4
# The file where info on paired devices is stored
file_devices = devices.xml
file_devices = devices.json
# How long to wait in milliseconds for data from moonlight before shutting down the stream
ping_timeout = 2000