\App\CoreModule\ModelsCommandManager

Tool for executing commands

Summary

Methods
Properties
Constants
__construct()
commandExist()
run()
runAsync()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(  sudo) : 

Constructor

Parameters

sudo

Is sudo required?

Returns

commandExist()

commandExist(  cmd) : 

Checks the existence of a command

Parameters

cmd

Command

Returns

Is the command exists?

run()

run(  cmd,   needSudo = false) : 

Executes shell command and returns output

Parameters

cmd

Command to execute

needSudo

Is the command needs sudo?

Returns

Output

runAsync()

runAsync(  callback,   cmd,   needSudo = false,   timeout = 36000) : 

Executes the command asynchronously

Parameters

callback

Callback to run whenever there is some output available on STDOUT or STDERR

cmd

Command to execute

needSudo

Is the command needs sudo?

timeout

Command's timeout

Returns