I’m trying to run an script file from an executeCommandLine in my OpenHAB rules. The log shows that it saw the push button and executed the command, but I don’t think it’s actually running the shell script. Here’s what I have:
Item itm_frm_off received update
But that doesn’t help. I have another Pi running Raspbian that uses the same setup, and that one works. Looking through the forum posts, this seems to happen, but it’s a mystery why it happens. Any tips?
How did you run the script? did you use ‘sh scriptname’ or ‘./scriptname’? The reason for asking is that the ‘sh’ method is tolerant of non-unix type files, whereas the direct execution mode isn’t. This usually happens when you’ve edited the script on a windows machine, and copied it to your Linux machine. If this is the case, you can use vim to fix it, with the command :set ff=unix.