- class platypush.plugins.shell.ShellPlugin(**kwargs)¶
Plugin to run custom shell commands.
- exec(cmd, background=False, ignore_errors=False)¶
Execute a command.
cmd (str) – Command to execute
background – If set to True, execute the process in the background, otherwise wait for the process termination and return its output (deafult: False).
ignore_errors – If set, then any errors in the command execution will be ignored. Otherwise a RuntimeError will be thrown (default value: False)
A response object where the
outputfield will contain the command output as a string, and the
errorsfield will contain whatever was sent to stderr.