exexCommandLine isn`t working in rule on OH2

rules
openhab2
Tags: #<Tag:0x00007f1e5ba5bdf8> #<Tag:0x00007f1e5ba5bcb8>
(Jesco) #1

Hi,
I`ve just created a rule for triggering a very basic .sh script with an Amazon Dash button. The Dash button itself works fine, the script as well, but not in combination. I got a warning in the log:

Configuration model 'dash.rules' is either empty or cannot be parsed correctly!

My rule (dash.rule) looks like that:

rule "Dash button pressed"
when
Channel "amazondashbutton:dashbutton:xx:xx:xx:xx:xx:xx:press" triggered
then
executeCommandLine("bash -s < /etc/openhab2/scripts/shairport_restart.sh",5000)
end

Do you have any idea or a hint for me?

Thanks Jesco

0 Likes

(Angelos) #2

did you try without the "bash -t < " part?

0 Likes

(Rich Koshak) #3
2 Likes

(Jesco) #4

Thanks Rich, i`m gonna look at it! Cheers Jesco

0 Likes