mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Doc setsysctl action.
This commit is contained in:
@@ -19,7 +19,7 @@ The systemmanager class is used to retrieve information about the system. Every
|
||||
| | | |
|
||||
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
| action | | supported actions include "memorystats", "cpupercentage", "cputemps", "procinfo", "killproc", "batteryinfo", |
|
||||
| | | "externalmounts", "systemmanager", and "sysctllist" |
|
||||
| | | "externalmounts", "systemmanager", "sysctllist", and "setsysctl" |
|
||||
| | | |
|
||||
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -658,4 +658,70 @@ The "sysctllist" action lists returns the list of all setable sysctl values. Sin
|
||||
"id": "fooid",
|
||||
"name": "response",
|
||||
"namespace": "sysadm"
|
||||
}
|
||||
|
||||
.. index:: setsysctl, systemmanager
|
||||
|
||||
.. _Set a Sysctl:
|
||||
|
||||
Set a Sysctl
|
||||
============
|
||||
|
||||
The "setsysctl" action sets the specified setable sysctl to the specified value. The response indicates that the old value was changed to the new value.
|
||||
|
||||
**REST Request**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
PUT /sysadm/systemmanager
|
||||
{
|
||||
"value" : "0",
|
||||
"sysctl" : "security.jail.mount_devfs_allowed",
|
||||
"action" : "setsysctl"
|
||||
}
|
||||
|
||||
**REST Response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"args": {
|
||||
"setsysctl": {
|
||||
"response": "security.jail.mount_devfs_allowed: 1 -> 0",
|
||||
"sysctl": "security.jail.mount_devfs_allowed",
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
**WebSocket Request**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"args" : {
|
||||
"value" : "0",
|
||||
"action" : "setsysctl",
|
||||
"sysctl" : "security.jail.mount_devfs_allowed"
|
||||
},
|
||||
"name" : "systemmanager",
|
||||
"namespace" : "sysadm",
|
||||
"id" : "fooid"
|
||||
}
|
||||
|
||||
**WebSocket Response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"args": {
|
||||
"setsysctl": {
|
||||
"response": "security.jail.mount_devfs_allowed: 1 -> 0",
|
||||
"sysctl": "security.jail.mount_devfs_allowed",
|
||||
"value": "0"
|
||||
}
|
||||
},
|
||||
"id": "fooid",
|
||||
"name": "response",
|
||||
"namespace": "sysadm"
|
||||
}
|
||||
Reference in New Issue
Block a user