Thank you for your detailed answer. Indeed, now I noticed that I had forgot the suffix for my script (it was shutdown.sh instead of shutdown).
[14:58:37] openhabian@openHABianPi:~$ ls
README.txt reboot.sh shutdown.sh
[15:01:41] openhabian@openHABianPi:~$ pwd
The script is nothing complex, really:
[14:57:11] openhabian@openHABianPi:~$ cat shutdown.sh
echo "`date`: shutdown : $1 $2" >> /tmp/shutdown_script.log 2>&1
ssh $1@$2 /sbin/shutdown now >> /tmp/shutdown_script.log 2>&1
I changed the Thing to refer to the correct script now. Now my Thing looks as follows:
However, this doesn’t help too much as I still cannot run the script from the Control panel.
When I run the script locally, I get nothing as the output is redirected to the log file:
[15:01:47] openhabian@openHABianPi:~$ ./shutdown.sh root 192.168.1.10
In the log file I get the results of the shutdown operation. My kodi is turned off now and I don’t have access to it to restart it (this is why it shows up as not accessible). However, it’s clear that the script functions correctly.
[15:05:41] openhabian@openHABianPi:~$ cat /tmp/shutdown_script.log
Tue Jan 8 15:18:42 EET 2019: shutdown : root 192.168.1.10
ssh: connect to host 192.168.1.10 port 22: No route to host
For some reason I didn’t find Rich’s guide until now. I will try to read it thoroughly to see if it can help.