diff --git a/api/classes/systemmanager.rst b/api/classes/systemmanager.rst index 15c070b..bd48b09 100644 --- a/api/classes/systemmanager.rst +++ b/api/classes/systemmanager.rst @@ -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" } \ No newline at end of file