diff --git a/extension/Documentation/Manual.rst b/extension/Documentation/Manual.rst index 013305082df06c9f2cf2d5c5048df85d1f159ab6..467fbedee73f5b6be936d4d6cb3421ed8bf02249 100644 --- a/extension/Documentation/Manual.rst +++ b/extension/Documentation/Manual.rst @@ -6170,7 +6170,29 @@ Renders images. Allows to define an alternative text and a title attribute for t Column: _exec ^^^^^^^^^^^^^ -Runs batch files or executables on the webserver. In case of an error, returncode and errormessage will be returned. +Run any command on the web server. + + * The command is run via web server, so with the uid of the web server. + * The current working directory is the current web instance (e.g. ``/var/www/html``) . + * All text send to 'stdout' will be returned. + * Text send to 'stderr' is not returned at all. + * If 'stderr' should be shown, redirect the output:: + + SELECT 'touch /root 2>&1' AS _exec + + * If 'stdout' / 'stderr' should not be displayed, redirect the output:: + + SELECT 'touch /tmp >/dev/null' AS _exec + SELECT 'touch /root 2>&1 >/dev/null' AS _exec + + * Multiple commands can be concatenated by `;`:: + + SELECT 'date; date' AS _exec + + * If the return code is not 0, the string '[<rc>] ', will be prepended. + * If it is not wished to see the return code, just add ``true`` to fake rc of 0 (only the last rc will be reported):: + + SELECT 'touch /root; true' AS _exec **Syntax**