Doc execjail action.

This commit is contained in:
dlavigne
2016-02-11 12:35:37 -05:00
parent 37b55c6f8f
commit cfb7537d78

View File

@@ -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: