浏览代码

app_python3s: docs for script_child_init parameter

Daniel-Constantin Mierla 2 年之前
父节点
当前提交
d79e008927
共有 1 个文件被更改,包括 25 次插入1 次删除
  1. 25 1
      src/modules/app_python3s/doc/app_python3s_admin.xml

+ 25 - 1
src/modules/app_python3s/doc/app_python3s_admin.xml

@@ -104,7 +104,7 @@ modparam("app_python3s", "load", "/usr/local/etc/kamailio/myscript.py")
 </programlisting>
 	    </example>
 	</section>
-	<section id="app_python3s.p.load">
+	<section id="app_python3s.p.script_init">
 	    <title><varname>script_init</varname> (string)</title>
 	    <para>
 			The name of the Python function to be executed when the script is
@@ -125,6 +125,30 @@ def ksr_script_init():
     KSR.info("init python script\n")
     return 1
 ...
+</programlisting>
+	    </example>
+	</section>
+	<section id="app_python3s.p.script_child_init">
+	    <title><varname>script_child_init</varname> (string)</title>
+	    <para>
+			The name of the Python function to be executed when &kamailio; forks
+			child processes at startup and when the script is reloaded.
+	    </para>
+	    <para>
+		<emphasis>
+			Default value is <quote></quote> (not set).
+		</emphasis>
+	    </para>
+	    <example>
+		<title>Set <varname>script_child_init</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("app_python3s", "script_child_init", "ksr_script_child_init")
+...
+def ksr_script_child_init():
+    KSR.info("child init python script\n")
+    return 1
+...
 </programlisting>
 	    </example>
 	</section>