summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJérôme Sautret <jerome.sautret@process-one.net>2008-07-18 15:55:39 +0000
committerJérôme Sautret <jerome.sautret@process-one.net>2008-07-18 15:55:39 +0000
commit999c81e79c615560334d682de4816e9d64238e3d (patch)
tree9c268e78f32e9da2fbbdd31f49eddc2941c5184f /src
parent* src/mod_muc/mod_muc_room.erl: Fix to allow a server admin to add (diff)
* src/ejabberd_ctl.erl: Call reopen_log_hook for each virtual host.
SVN Revision: 1461
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_ctl.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl
index 9a84b592..e6031bed 100644
--- a/src/ejabberd_ctl.erl
+++ b/src/ejabberd_ctl.erl
@@ -16,7 +16,7 @@
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
-%%%
+%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
@@ -99,6 +99,9 @@ process(["restart"]) ->
process(["reopen-log"]) ->
ejabberd_hooks:run(reopen_log_hook, []),
+ lists:foreach(fun(Host) ->
+ ejabberd_hooks:run(reopen_log_hook, Host, [Host])
+ end, ?MYHOSTS),
%% TODO: Use the Reopen log API for logger_h ?
ejabberd_logger_h:reopen_log(),
?STATUS_SUCCESS;
@@ -158,7 +161,7 @@ process(["load", Path]) ->
end;
process(["restore", Path]) ->
- case ejabberd_admin:restore(Path) of
+ case ejabberd_admin:restore(Path) of
{atomic, _} ->
?STATUS_SUCCESS;
{error, Reason} ->
@@ -384,7 +387,7 @@ dump_to_textfile(yes, {ok, F}) ->
end, Tabs1),
Defs = lists:map(
fun(T) -> {T, [{record_name, mnesia:table_info(T, record_name)},
- {attributes, mnesia:table_info(T, attributes)}]}
+ {attributes, mnesia:table_info(T, attributes)}]}
end,
Tabs),
io:format(F, "~p.~n", [{tables, Defs}]),