exexCommandLine isn`t working in rule on OH2

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

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

2 Likes

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