i have code that will return either:
RUNNING
STOPPED
or return blank if the app does not exist, that code is
midclt call app.query '[["name", "=", "app_name"]]' | jq -r '.[] | .state'
my issue is, that when passing the app_name as a variable, the command always returns an empty response, but when i hard code the app name, it works as expected.
below is an example, when i load “chromium” into the variable “name” and pass it to the command, it returns nothing, but the hard coded worked
root@truenas[/mnt/volume1/logging]# name="chromium"; midclt call app.query '[["name", "=", "${name}"]]' | jq -r '.[] | .state'
root@truenas[/mnt/volume1/logging]# midclt call app.query '[["name", "=", "chromium"]]' | jq -r '.[] | .state'
RUNNING
any ideas on why the command does not seem to allow passing it a variable?