I tried to execute a little script that just creates a file (touch test)
unfortunately nothing happens.
file is executable as user openhab and is working fine if i execute on commandline
also i tried with a rule as done in the config guide of the binding. nothing
Try it as an action so that you can log out the results
rule "test exec"
when
Item global_backup received command
then
val String result=executeCommandLine("/etc/openhab2/scripts/test.sh",5000)
logInfo("exectest", "Command line result: {}",result)
end
22:59:29.268 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'global_backup' received command ON
22:59:29.268 [DEBUG] [untime.internal.engine.RuleEngineImpl] - Executing rule 'test exec'
22:59:29.281 [INFO ] [arthome.event.ItemStatePredictedEvent] - global_backup predicted to become ON
22:59:29.311 [INFO ] [smarthome.event.ItemStateChangedEvent] - global_backup changed from OFF to ON
22:59:29.316 [INFO ] [smarthome.event.ItemStateChangedEvent] - global_backup changed from ON to OFF
22:59:29.324 [DEBUG] [nhab.binding.exec.handler.ExecHandler] - Transformed response is ''
22:59:29.339 [INFO ] [lipse.smarthome.model.script.exectest] - Command line result: