diff --git a/doc/guide.html b/doc/guide.html
index d0667c8c7..3ff220a13 100644
--- a/doc/guide.html
+++ b/doc/guide.html
@@ -348,7 +348,7 @@ GNU Make
Erlang mysql library. Optional. For MySQL authentication or storage. See section 3.2.1.
Erlang pgsql library. Optional. For PostgreSQL authentication or storage. See section 3.2.3.
PAM library. Optional. For Pluggable Authentication Modules (PAM). See section 3.1.4.
-ImageMagick’s Convert program. Optional. For CAPTCHA challenges. See section 3.1.8.
+ImageMagick’s Convert program, and Bash. Optional. For CAPTCHA challenges. See section 3.1.8.
Released versions of ejabberd are available in the ProcessOne ejabberd downloads page:
@@ -1233,7 +1233,7 @@ In order to take effect there must be a translation file
Some ejabberd modules can be configured to require a CAPTCHA challenge on certain actions.
If the client does not support CAPTCHA Forms (XEP-0158),
-a web link is provided so the user can fill the challenge in a web browser.
An example script is provided that generates the image
+a web link is provided so the user can fill the challenge in a web browser.
An example Bash script is provided that generates the image
using ImageMagick’s Convert program.
The configurable options are:
-
{captcha_cmd, Path}
-
diff --git a/doc/guide.tex b/doc/guide.tex
index 837d51c64..df8fc97a1 100644
--- a/doc/guide.tex
+++ b/doc/guide.tex
@@ -312,7 +312,7 @@ To compile \ejabberd{} on a `Unix-like' operating system, you need:
\item Erlang mysql library. Optional. For MySQL authentication or storage. See section \ref{compilemysql}.
\item Erlang pgsql library. Optional. For PostgreSQL authentication or storage. See section \ref{compilepgsql}.
\item PAM library. Optional. For Pluggable Authentication Modules (PAM). See section \ref{pam}.
-\item ImageMagick's Convert program. Optional. For CAPTCHA challenges. See section \ref{captcha}.
+\item ImageMagick's Convert program, and Bash. Optional. For CAPTCHA challenges. See section \ref{captcha}.
\end{itemize}
\makesubsection{download}{Download Source Code}
@@ -1531,7 +1531,7 @@ Some \ejabberd{} modules can be configured to require a CAPTCHA challenge on cer
If the client does not support CAPTCHA Forms (\xepref{0158}),
a web link is provided so the user can fill the challenge in a web browser.
-An example script is provided that generates the image
+An example Bash script is provided that generates the image
using ImageMagick's Convert program.
The configurable options are:
diff --git a/tools/captcha.sh b/tools/captcha.sh
index 4d405673a..d68edfa03 100644
--- a/tools/captcha.sh
+++ b/tools/captcha.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
INPUT=$1