start/stop apps from the linux shell
I am currently working on a full automatic provisioning system for our plcnext based product, one of the last features I'm working on is to install the "Mosquitto MQTT for PLCnext" app over ssh, I have been able to install it using the method mentioned here: https://www.plcnext-community.net/forum/#/discussion/3446/installing-apps-from-the-linux-shell
now I can see and start the app from the wbm but I have not found the way to start (and stop) it through ssh. Can someone tell me how to do that?
Comments
So what I tried but didn't fully work was to unsquashfs the installed app to the /opt/plcnext/apps but it seems to need more config.
sudo mkdir -p /opt/plcnext/apps/{APP_ID}
sudo unsquashfs -q -n -f -d /opt/plcnext/apps/{APP_ID} /opt/plcnext/installed_apps/{APP_ID}/{APP_ID}.app
this results in an app that shows as running in the wbm, but I can't connect to the mqtt broker (app I'm trying to run.)
when I then do a stop and a start from the wbm i can connect to the mqtt...
Same shows running but not connectable if i add the APP_ID to the list in /etc/plcnext/active_apps.json
Unfortunately all the app operations that are possible from a browser - including installing, starting, and stopping PLCnext Store apps - are not currently supported from the command-line.
In firmware version 2025.0 there will be an "App Manager" RSC service that will provide a C++ API for these operations. This service can be tested today, using the 2025.0 preview version that was recently made public.