Setting config at run time #3858
-
Hello, I wanted to know if it is possible to set/change any config variables that we set in ejabberd.yml file, from the code at run time. Basically I want to set websocket_timeout and websocket_ping_interval to some custom values at run time. Below are some details about tech /stack used. Library used: Strophe.js If anyone has any idea about it, please help. Thanks !! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You restart ejabberd that often? Edit .yml via some script and then |
Beta Was this translation helpful? Give feedback.
-
It is possible using a deprecated function, so this isn't a long-term solution. (ejabberd@localhost)2> ejabberd_option:websocket_ping_interval().
60000
(ejabberd@localhost)3> ejabberd_config:set_option(websocket_ping_interval, 12334).
ok
(ejabberd@localhost)4> ejabberd_option:websocket_ping_interval().
12334 The preferable solution is to edit ejabberd.yml and reload configuration. |
Beta Was this translation helpful? Give feedback.
It is possible using a deprecated function, so this isn't a long-term solution.
The preferable solution is to edit ejabberd.yml and reload configuration.