Does anybody know the correct command line for sshpass to SSH in, start a script and log out again?

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 :slight_smile:

I had to install screen on my linux machine first.

1 Like