Hey there,
this is the payload I attach to the login command:
msg.payload = "'screen -S nrrestart -d -m ./services/iq/restartstack.sh'"
And this is my restartstack.sh
#!/bin/bash
cd /home/pi/services/iq
docker compose down
docker compose up -d
After docker compose down, nodered is no longer running. However, it comes up again, because docker compose up -d brings it back
I had to install screen on my linux machine first.