mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
Doc execjail action.
This commit is contained in:
@@ -21,8 +21,8 @@ Every iocage class request contains the following parameters:
|
||||
| | | |
|
||||
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| action | | supported actions include "getdefaultsettings", "listjails", "getjailsettings", "df", "startjail", "stopjail", |
|
||||
| | | "capjail", "clonejail", "createjail", "destroyjail", "cleanjails", "cleanreleases", "cleantemplates", "cleanall", |
|
||||
| | | "activatepool", and "deactivatepool" |
|
||||
| | | "capjail", "clonejail", "createjail", "destroyjail", "execjail", "cleanjails", "cleanreleases", "cleantemplates", |
|
||||
| | | "cleanall", "activatepool", and "deactivatepool" |
|
||||
| | | |
|
||||
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -1156,6 +1156,61 @@ The "destroyjail" action destroys the specified jail. This action is irreversibl
|
||||
"namespace": "sysadm"
|
||||
}
|
||||
|
||||
.. index:: execjail, iocage
|
||||
|
||||
.. _Run Command:
|
||||
|
||||
Run Command
|
||||
===========
|
||||
|
||||
The "execjail" action executes the specified "command" under the privileges of the specified "user" in the specified "jail". The response will indicate whether or not command execution
|
||||
succeeded as well as any output from the command.
|
||||
|
||||
**REST Request**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
PUT /sysadm/iocage
|
||||
{
|
||||
"action" : "execjail",
|
||||
"jail" : "test",
|
||||
"command" : "echo hi",
|
||||
"user" : "root"
|
||||
}
|
||||
|
||||
**WebSocket Request**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"namespace" : "sysadm",
|
||||
"name" : "iocage",
|
||||
"args" : {
|
||||
"user" : "root",
|
||||
"action" : "execjail",
|
||||
"jail" : "test",
|
||||
"command" : "echo hi"
|
||||
},
|
||||
"id" : "fooid"
|
||||
}
|
||||
|
||||
**Response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"args": {
|
||||
"execjail": {
|
||||
"success": {
|
||||
"hi": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "fooid",
|
||||
"name": "response",
|
||||
"namespace": "sysadm"
|
||||
}
|
||||
|
||||
.. index:: cleanjails, iocage
|
||||
|
||||
.. _Clean Jails:
|
||||
|
||||
Reference in New Issue
Block a user