Documentation
IPS_SetOption
bool IPS_SetOption (string $Option, mixed $Value)
Parameters
| Option | Name of the option, e.g. "ThreadCount" |
| Value | New value of the option |
Returns
If the function succeeds, it returns TRUE, otherwise FALSE.
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function sets the special switch Option to the value Value. The names of all options are returned by IPS_GetOptionList.
Most options are only applied by IP-Symcon at startup. A change therefore usually only takes effect after a restart of IP-Symcon.
The new value is stored in the settings immediately and returned by IPS_GetOption. IPS_GetOptionEx keeps returning the value IP-Symcon was started with as Current until a restart has taken place.
Value is converted to the data type of the option. For a boolean option, an integer or float value greater than 0 results in TRUE, a string only results in TRUE for "True". For an integer or float option, a string is interpreted as a number, for a string option numbers are stored as text.
If the option does not exist, the function fails with "Cannot find option ... node in settings". New options cannot be created with this function.
Example
// Disable logging of script executions
IPS_SetOption("ScriptWatch", false);
// Increase the number of PHP threads
IPS_SetOption("ThreadCount", 100);
// The changes only take effect after a restart of IP-Symcon