I have a switch item, with the exec binding. The command is:
OFF:ssh pi@192.168.0.111 sudo /etc/init.d/webcam.sh restart
I have it in a sitemap, with the mapping
OFF="Restart"
So it shows up all nice.
When I tap the Restart button in my sitemap, I see in my log
executed commandLine 'ssh pi@192.168.0.111 sudo /etc/init.d/webcam.sh restart'
but nothing happens.
If I manually run the complete command
ssh pi@192.168.0.111 sudo /etc/init.d/webcam.sh restart
from the machine that is running openhab, I can see that it executes, and everything works fine.
I’ve also tried a different command, like /sbin/shutdown -r now, and it’s the same thing.
SSH is configured fine.
What is the problem here? Or how should I debug to see the output of the exec, what does the second machine respond when it receives the command?