-
Notifications
You must be signed in to change notification settings - Fork 26
Websocket Command Line Tool
Rye Terrell edited this page May 19, 2014
·
1 revision
If there is no running terminal or command on the connection, starts the Argv command. Otherwise, sends data to stdin.
{
"Action": "EXEC",
"Argv": ["bash", "-c", "ls -al"]
}
-- stdin --
{
"Action": "EXEC",
"Argv": ["your command here"]
}
- Argv: Command line args. Must specify the file to execute when running a single command. Otherwise, pass stdin to the first element of the 'Argv' param.
Opens a new PTY terminal on the host.
{
"Action": "FORK",
"Argv": ["/bin/sh","sh"],
"TermName": "xterm",
"TermCwd": "/home/zenoss",
"TermCols": 80,
"TermRows": 24,
"TermUid": "zenoss",
"TermGid": "zenoss",
"TermEnv": {}
}
- Argv: Command to start the shell terminal (default: 'sh')
- TermName: Name of the terminal (default: SYSTEM DEFINED)
- TermCwd: The current working directory of the terminal (default: '.')
- TermCols: Width of the terminal (default: 80)
- TermRows: Height of the terminal (default: 24)
- TermUid: Terminal User Id (default: SYSTEM DEFINED)
- TermGid: Terminal Group Id (default: SYSTEM DEFINED)
- TermEnv: Environment variables (default: SYSTEM DEFINED)
Sends a signal to a running process. Typically, this would be SIGINT(0x2), SIGKILL(0x9), or SIGHUP(0x1).
{
"Action": "SIGNAL",
"Signal": 2
}
- Signal: Signal to send to the running process or terminal.
Resizes the current running terminal.
{
"Action": "RESIZE",
"TermCols": 80,
"TermRows": 24
}
- TermCols: Width of the terminal
- TermRows: Height of the terminal