If I call app.start myApp while the app is already running, it seems to basically RESTART it, which is not what I want. Therefore, I’m trying to put together a command that checks first if the app is already running.
This is what I’ve cobbled together so far: [ $(midclt call app.container_ids myApp) = "{}" ] && midclt call app.start myApp
It seems to work basically, but if the app is already running, I’m always getting a message like this: zsh: condition expected: {"c776bc7fe454095a7a6f838f4bdb656d4da72fb7768f4128cdc557d8c5fcd601":
I guess this has more to do with my lack of skill in the shell and less with midclt, but I would appreciate any ideas.
If i remember well, you can call app.query and retrive all ix apps info, including the state.
Setup this call before the app.start, build your array conditionally on the app not in running state, and you should achieve this easily