Be aware that the openHAB startup script will change the permissions of all the files in the configurations/scripts folder every time OH starts, stripping away the execute permission. You either need to move the script to some other folder (e.g. ~openhab/bin) or create a rule that adds the execute permission to the script before trying to execute it.
Many thanks for your information.
And openhab not only reset the rights of files in the script folder, I think in every folder in configuations will openhab reset the rights.
But now I use new folder outside, and it works
Came across this post while having the same issue. Worked fine when running as “openhab”, would not run when openhab kicked it off. Tried “everything”.
Added added 1>> /tmp/tmp 2>> /tmp/tmp to capture the output:
Pseudo-terminal will not be allocated because stdin is not a terminal.
sudo: sorry, you must have a tty to run sudo
Adding a 2nd -t fixed the issue for me:
/usr/bin/ssh -t -t user@host ./remote.sh 1>> /tmp/a 2>> /tmp/a
Hope this helps someone else…
Edit:
Working (for me) item:
Switch Zoneminder "Zoneminder" { exec=">[ON:/usr/bin/ssh -t -t user@host ./Mode1.sh] >[OFF:/usr/bin/ssh -t -t user@host ./Mode2.sh]" }
JJ
Hi @rken,
Can you please help me out…?
I want to run simple script using exec binding ,
- what should be my wave.items file entry.
- Is any other configuration needs to be done…?
My items entry looks like:
Switch RRR {exec:">[ON: /bin/sh /home/ard/abc.sh]"}
with this entry its not working
Regards,
shrikant