Class Exec
java.lang.Object
org.openhab.core.model.script.actions.Exec
This class provides static methods that can be used in automation rules for
executing commands on command line.
- Author:
- Pauli Anttila
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
executeCommandLine
(String... commandLine) ExecutescommandLine
.static String
executeCommandLine
(Duration timeout, String... commandLine) ExecutescommandLine
.
-
Constructor Details
-
Exec
public Exec()
-
-
Method Details
-
executeCommandLine
Executes
commandLine
.A possible
IOException
gets logged but no further processing is done.- Parameters:
commandLine
- the command line to execute
-
executeCommandLine
Executes
commandLine
.A possible
IOException
gets logged but no further processing is done.- Parameters:
timeout
- timeout for execution, if null will wait indefinitelycommandLine
- the command line to execute- Returns:
- response data from executed command line
-