mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
mod_http_upload: Check availability of ImageMagick
Log an error message during startup if the thumbnail option is enabled but ImageMagick is not installed.
This commit is contained in:
parent
eeb705fc2f
commit
9d2f1d5f0d
@ -272,6 +272,18 @@ init({ServerHost, Opts}) ->
|
||||
Mode ->
|
||||
file:change_mode(DocRoot, Mode)
|
||||
end,
|
||||
case Thumbnail of
|
||||
true ->
|
||||
case string:str(os:cmd("identify"), "Magick") of
|
||||
0 ->
|
||||
?ERROR_MSG("Cannot find 'identify' command, please install "
|
||||
"ImageMagick or disable thumbnail creation", []);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
ejabberd_router:register_route(Host),
|
||||
{ok, #state{server_host = ServerHost, host = Host, name = Name,
|
||||
access = Access, max_size = MaxSize,
|
||||
|
Loading…
Reference in New Issue
Block a user