Read a value from a script

Anyone have any luck reading a value from a local script? I want to add a string item to my config that will contain the server name the openhab process is currently running on (downside to a clustered environment :smile:)

You need to provide the timeout value in the call to val String result = executeCommandLine(String command, int timeout) instead of the call that only takes the command argument or in your rule or bound the script to an Exec Binding String Item.

Thank you. That pointed me in the right direction. I ended up using the exec binding to read in my host name. had a hell of a time with the spaces between /bin/cat and hostname but eventually figured out that the @@ was needed and that fixed me up.