1 -- Copyright (C) 2009-2011 Florian Zeitz
3 -- This file is MIT/X11 licensed. Please see the
4 -- COPYING file in the source package for more information.
9 local prosody = _G.prosody;
10 local hosts = prosody.hosts;
11 local t_concat = table.concat;
13 local iterators = require "util.iterators";
14 local keys, values = iterators.keys, iterators.values;
15 local usermanager_user_exists = require "core.usermanager".user_exists;
16 local usermanager_create_user = require "core.usermanager".create_user;
17 local usermanager_delete_user = require "core.usermanager".delete_user;
18 local usermanager_get_password = require "core.usermanager".get_password;
19 local usermanager_set_password = require "core.usermanager".set_password;
20 local hostmanager_activate = require "core.hostmanager".activate;
21 local hostmanager_deactivate = require "core.hostmanager".deactivate;
22 local is_admin = require "core.usermanager".is_admin;
23 local rm_load_roster = require "core.rostermanager".load_roster;
24 local st, jid, uuid = require "util.stanza", require "util.jid", require "util.uuid";
25 local timer_add_task = require "util.timer".add_task;
26 local dataforms_new = require "util.dataforms".new;
27 local array = require "util.array";
28 local modulemanager = require "modulemanager";
29 local core_post_stanza = prosody.core_post_stanza;
31 module:depends("adhoc");
32 local adhoc_new = module:require "adhoc".new;
34 local function generate_error_message(errors)
36 for name, err in pairs(errors) do
37 errmsg[#errmsg + 1] = name .. ": " .. err;
39 return { status = "completed", error = { message = t_concat(errmsg, "\n") } };
42 function add_user_command_handler(self, data, state)
43 local add_user_layout = dataforms_new{
44 title = "Adding a User";
45 instructions = "Fill out this form to add a user.";
47 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
48 { name = "accountjid", type = "jid-single", required = true, label = "The Jabber ID for the account to be added" };
49 { name = "password", type = "text-private", label = "The password for this account" };
50 { name = "password-verify", type = "text-private", label = "Retype password" };
54 if data.action == "cancel" then
55 return { status = "canceled" };
57 local fields, err = add_user_layout:data(data.form);
59 return generate_error_message(err);
61 local username, host, resource = jid.split(fields.accountjid);
62 if data.to ~= host then
63 return { status = "completed", error = { message = "Trying to add a user on " .. host .. " but command was sent to " .. data.to}};
65 if (fields["password"] == fields["password-verify"]) and username and host then
66 if usermanager_user_exists(username, host) then
67 return { status = "completed", error = { message = "Account already exists" } };
69 if usermanager_create_user(username, fields.password, host) then
70 module:log("info", "Created new account %s@%s", username, host);
71 return { status = "completed", info = "Account successfully created" };
73 return { status = "completed", error = { message = "Failed to write data to disk" } };
77 module:log("debug", "Invalid data, password mismatch or empty username while creating account for %s", fields.accountjid or "<nil>");
78 return { status = "completed", error = { message = "Invalid data.\nPassword mismatch, or empty username" } };
81 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = add_user_layout }, "executing";
85 function change_user_password_command_handler(self, data, state)
86 local change_user_password_layout = dataforms_new{
87 title = "Changing a User Password";
88 instructions = "Fill out this form to change a user's password.";
90 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
91 { name = "accountjid", type = "jid-single", required = true, label = "The Jabber ID for this account" };
92 { name = "password", type = "text-private", required = true, label = "The password for this account" };
96 if data.action == "cancel" then
97 return { status = "canceled" };
99 local fields, err = change_user_password_layout:data(data.form);
101 return generate_error_message(err);
103 local username, host, resource = jid.split(fields.accountjid);
104 if data.to ~= host then
105 return { status = "completed", error = { message = "Trying to change the password of a user on " .. host .. " but command was sent to " .. data.to}};
107 if usermanager_user_exists(username, host) and usermanager_set_password(username, fields.password, host) then
108 return { status = "completed", info = "Password successfully changed" };
110 return { status = "completed", error = { message = "User does not exist" } };
113 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = change_user_password_layout }, "executing";
117 function config_reload_handler(self, data, state)
118 local ok, err = prosody.reload_config();
120 return { status = "completed", info = "Configuration reloaded (modules may need to be reloaded for this to have an effect)" };
122 return { status = "completed", error = { message = "Failed to reload config: " .. tostring(err) } };
127 function delete_user_command_handler(self, data, state)
128 local delete_user_layout = dataforms_new{
129 title = "Deleting a User";
130 instructions = "Fill out this form to delete a user.";
132 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
133 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) to delete" };
137 if data.action == "cancel" then
138 return { status = "canceled" };
140 local fields, err = delete_user_layout:data(data.form);
142 return generate_error_message(err);
145 local succeeded = {};
146 for _, aJID in ipairs(fields.accountjids) do
147 local username, host, resource = jid.split(aJID);
148 if (host == data.to) and usermanager_user_exists(username, host) and usermanager_delete_user(username, host) then
149 module:log("debug", "User %s has been deleted", aJID);
150 succeeded[#succeeded+1] = aJID;
152 module:log("debug", "Tried to delete non-existant user %s", aJID);
153 failed[#failed+1] = aJID;
156 return {status = "completed", info = (#succeeded ~= 0 and
157 "The following accounts were successfully deleted:\n"..t_concat(succeeded, "\n").."\n" or "")..
159 "The following accounts could not be deleted:\n"..t_concat(failed, "\n") or "") };
161 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = delete_user_layout }, "executing";
165 function disconnect_user(match_jid)
166 local node, hostname, givenResource = jid.split(match_jid);
167 local host = hosts[hostname];
168 local sessions = host.sessions[node] and host.sessions[node].sessions;
169 for resource, session in pairs(sessions or {}) do
170 if not givenResource or (resource == givenResource) then
171 module:log("debug", "Disconnecting %s@%s/%s", node, hostname, resource);
178 function end_user_session_handler(self, data, state)
179 local end_user_session_layout = dataforms_new{
180 title = "Ending a User Session";
181 instructions = "Fill out this form to end a user's session.";
183 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
184 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) for which to end sessions" };
188 if data.action == "cancel" then
189 return { status = "canceled" };
192 local fields, err = end_user_session_layout:data(data.form);
194 return generate_error_message(err);
197 local succeeded = {};
198 for _, aJID in ipairs(fields.accountjids) do
199 local username, host, resource = jid.split(aJID);
200 if (host == data.to) and usermanager_user_exists(username, host) and disconnect_user(aJID) then
201 succeeded[#succeeded+1] = aJID;
203 failed[#failed+1] = aJID;
206 return {status = "completed", info = (#succeeded ~= 0 and
207 "The following accounts were successfully disconnected:\n"..t_concat(succeeded, "\n").."\n" or "")..
209 "The following accounts could not be disconnected:\n"..t_concat(failed, "\n") or "") };
211 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = end_user_session_layout }, "executing";
215 function get_user_password_handler(self, data, state)
216 local get_user_password_layout = dataforms_new{
217 title = "Getting User's Password";
218 instructions = "Fill out this form to get a user's password.";
220 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
221 { name = "accountjid", type = "jid-single", required = true, label = "The Jabber ID for which to retrieve the password" };
224 local get_user_password_result_layout = dataforms_new{
225 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
226 { name = "accountjid", type = "jid-single", label = "JID" };
227 { name = "password", type = "text-single", label = "Password" };
231 if data.action == "cancel" then
232 return { status = "canceled" };
234 local fields, err = get_user_password_layout:data(data.form);
236 return generate_error_message(err);
238 local user, host, resource = jid.split(fields.accountjid);
239 local accountjid = "";
241 if host ~= data.to then
242 return { status = "completed", error = { message = "Tried to get password for a user on " .. host .. " but command was sent to " .. data.to } };
243 elseif usermanager_user_exists(user, host) then
244 accountjid = fields.accountjid;
245 password = usermanager_get_password(user, host);
247 return { status = "completed", error = { message = "User does not exist" } };
249 return { status = "completed", result = { layout = get_user_password_result_layout, values = {accountjid = accountjid, password = password} } };
251 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_user_password_layout }, "executing";
255 function get_user_roster_handler(self, data, state)
256 local get_user_roster_layout = dataforms_new{
257 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
258 { name = "accountjid", type = "jid-single", required = true, label = "The Jabber ID for which to retrieve the roster" };
261 local get_user_roster_result_layout = dataforms_new{
262 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
263 { name = "accountjid", type = "jid-single", label = "This is the roster for" };
264 { name = "roster", type = "text-multi", label = "Roster XML" };
268 if data.action == "cancel" then
269 return { status = "canceled" };
272 local fields, err = get_user_roster_layout:data(data.form);
275 return generate_error_message(err);
278 local user, host, resource = jid.split(fields.accountjid);
279 if host ~= data.to then
280 return { status = "completed", error = { message = "Tried to get roster for a user on " .. host .. " but command was sent to " .. data.to } };
281 elseif not usermanager_user_exists(user, host) then
282 return { status = "completed", error = { message = "User does not exist" } };
284 local roster = rm_load_roster(user, host);
286 local query = st.stanza("query", { xmlns = "jabber:iq:roster" });
287 for jid in pairs(roster) do
288 if jid ~= "pending" and jid then
291 subscription = roster[jid].subscription,
292 ask = roster[jid].ask,
293 name = roster[jid].name,
295 for group in pairs(roster[jid].groups) do
296 query:tag("group"):text(group):up();
302 local query_text = query:__tostring(); -- TODO: Use upcoming pretty_print() function
303 query_text = query_text:gsub("><", ">\n<");
305 local result = get_user_roster_result_layout:form({ accountjid = user.."@"..host, roster = query_text }, "result");
306 result:add_child(query);
307 return { status = "completed", other = result };
309 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_user_roster_layout }, "executing";
313 function get_user_stats_handler(self, data, state)
314 local get_user_stats_layout = dataforms_new{
315 title = "Get User Statistics";
316 instructions = "Fill out this form to gather user statistics.";
318 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
319 { name = "accountjid", type = "jid-single", required = true, label = "The Jabber ID for statistics" };
322 local get_user_stats_result_layout = dataforms_new{
323 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
324 { name = "ipaddresses", type = "text-multi", label = "IP Addresses" };
325 { name = "rostersize", type = "text-single", label = "Roster size" };
326 { name = "onlineresources", type = "text-multi", label = "Online Resources" };
330 if data.action == "cancel" then
331 return { status = "canceled" };
334 local fields, err = get_user_stats_layout:data(data.form);
337 return generate_error_message(err);
340 local user, host, resource = jid.split(fields.accountjid);
341 if host ~= data.to then
342 return { status = "completed", error = { message = "Tried to get stats for a user on " .. host .. " but command was sent to " .. data.to } };
343 elseif not usermanager_user_exists(user, host) then
344 return { status = "completed", error = { message = "User does not exist" } };
346 local roster = rm_load_roster(user, host);
347 local rostersize = 0;
349 local resources = "";
350 for jid in pairs(roster) do
351 if jid ~= "pending" and jid then
352 rostersize = rostersize + 1;
355 for resource, session in pairs((hosts[host].sessions[user] and hosts[host].sessions[user].sessions) or {}) do
356 resources = resources .. "\n" .. resource;
357 IPs = IPs .. "\n" .. session.ip;
359 return { status = "completed", result = {layout = get_user_stats_result_layout, values = {ipaddresses = IPs, rostersize = tostring(rostersize),
360 onlineresources = resources}} };
362 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_user_stats_layout }, "executing";
366 function get_online_users_command_handler(self, data, state)
367 local get_online_users_layout = dataforms_new{
368 title = "Getting List of Online Users";
369 instructions = "How many users should be returned at most?";
371 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
372 { name = "max_items", type = "list-single", label = "Maximum number of users",
373 value = { "25", "50", "75", "100", "150", "200", "all" } };
374 { name = "details", type = "boolean", label = "Show details" };
377 local get_online_users_result_layout = dataforms_new{
378 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
379 { name = "onlineuserjids", type = "text-multi", label = "The list of all online users" };
383 if data.action == "cancel" then
384 return { status = "canceled" };
387 local fields, err = get_online_users_layout:data(data.form);
390 return generate_error_message(err);
393 local max_items = nil
394 if fields.max_items ~= "all" then
395 max_items = tonumber(fields.max_items);
399 for username, user in pairs(hosts[data.to].sessions or {}) do
400 if (max_items ~= nil) and (count >= max_items) then
403 users[#users+1] = username.."@"..data.to;
405 if fields.details then
406 for resource, session in pairs(user.sessions or {}) do
407 local status, priority = "unavailable", tostring(session.priority or "-");
408 if session.presence then
409 status = session.presence:child_with_name("show");
411 status = status:get_text() or "[invalid!]";
413 status = "available";
416 users[#users+1] = " - "..resource..": "..status.."("..priority..")";
420 return { status = "completed", result = {layout = get_online_users_result_layout, values = {onlineuserjids=t_concat(users, "\n")}} };
422 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_online_users_layout }, "executing";
426 function list_modules_handler(self, data, state)
427 local result = dataforms_new {
428 title = "List of loaded modules";
430 { name = "FORM_TYPE", type = "hidden", value = "http://prosody.im/protocol/modules#list" };
431 { name = "modules", type = "text-multi", label = "The following modules are loaded:" };
434 local modules = array.collect(keys(hosts[data.to].modules)):sort():concat("\n");
436 return { status = "completed", result = { layout = result; values = { modules = modules } } };
439 function load_module_handler(self, data, state)
440 local layout = dataforms_new {
441 title = "Load module";
442 instructions = "Specify the module to be loaded";
444 { name = "FORM_TYPE", type = "hidden", value = "http://prosody.im/protocol/modules#load" };
445 { name = "module", type = "text-single", required = true, label = "Module to be loaded:"};
448 if data.action == "cancel" then
449 return { status = "canceled" };
451 local fields, err = layout:data(data.form);
453 return generate_error_message(err);
455 if modulemanager.is_loaded(data.to, fields.module) then
456 return { status = "completed", info = "Module already loaded" };
458 local ok, err = modulemanager.load(data.to, fields.module);
460 return { status = "completed", info = 'Module "'..fields.module..'" successfully loaded on host "'..data.to..'".' };
462 return { status = "completed", error = { message = 'Failed to load module "'..fields.module..'" on host "'..data.to..
463 '". Error was: "'..tostring(err or "<unspecified>")..'"' } };
466 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = layout }, "executing";
470 function reload_modules_handler(self, data, state)
471 local layout = dataforms_new {
472 title = "Reload modules";
473 instructions = "Select the modules to be reloaded";
475 { name = "FORM_TYPE", type = "hidden", value = "http://prosody.im/protocol/modules#reload" };
476 { name = "modules", type = "list-multi", required = true, label = "Modules to be reloaded:"};
479 if data.action == "cancel" then
480 return { status = "canceled" };
482 local fields, err = layout:data(data.form);
484 return generate_error_message(err);
486 local ok_list, err_list = {}, {};
487 for _, module in ipairs(fields.modules) do
488 local ok, err = modulemanager.reload(data.to, module);
490 ok_list[#ok_list + 1] = module;
492 err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")";
495 local info = (#ok_list > 0 and ("The following modules were successfully reloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "")..
496 (#err_list > 0 and ("Failed to reload the following modules on host "..data.to..":\n"..t_concat(err_list, "\n")) or "");
497 return { status = "completed", info = info };
499 local modules = array.collect(keys(hosts[data.to].modules)):sort();
500 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = { layout = layout; values = { modules = modules } } }, "executing";
504 function send_to_online(message, server)
506 sessions = { [server] = hosts[server] };
512 for domain, session in pairs(sessions) do
513 for user in pairs(session.sessions or {}) do
515 message.attr.from = domain;
516 message.attr.to = user.."@"..domain;
517 core_post_stanza(session, message);
524 function shut_down_service_handler(self, data, state)
525 local shut_down_service_layout = dataforms_new{
526 title = "Shutting Down the Service";
527 instructions = "Fill out this form to shut down the service.";
529 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
530 { name = "delay", type = "list-single", label = "Time delay before shutting down",
531 value = { {label = "30 seconds", value = "30"},
532 {label = "60 seconds", value = "60"},
533 {label = "90 seconds", value = "90"},
534 {label = "2 minutes", value = "120"},
535 {label = "3 minutes", value = "180"},
536 {label = "4 minutes", value = "240"},
537 {label = "5 minutes", value = "300"},
540 { name = "announcement", type = "text-multi", label = "Announcement" };
544 if data.action == "cancel" then
545 return { status = "canceled" };
548 local fields, err = shut_down_service_layout:data(data.form);
551 return generate_error_message(err);
554 if fields.announcement and #fields.announcement > 0 then
555 local message = st.message({type = "headline"}, fields.announcement):up()
556 :tag("subject"):text("Server is shutting down");
557 send_to_online(message);
560 timer_add_task(tonumber(fields.delay or "5"), prosody.shutdown);
562 return { status = "completed", info = "Server is about to shut down" };
564 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = shut_down_service_layout }, "executing";
568 function unload_modules_handler(self, data, state)
569 local layout = dataforms_new {
570 title = "Unload modules";
571 instructions = "Select the modules to be unloaded";
573 { name = "FORM_TYPE", type = "hidden", value = "http://prosody.im/protocol/modules#unload" };
574 { name = "modules", type = "list-multi", required = true, label = "Modules to be unloaded:"};
577 if data.action == "cancel" then
578 return { status = "canceled" };
580 local fields, err = layout:data(data.form);
582 return generate_error_message(err);
584 local ok_list, err_list = {}, {};
585 for _, module in ipairs(fields.modules) do
586 local ok, err = modulemanager.unload(data.to, module);
588 ok_list[#ok_list + 1] = module;
590 err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")";
593 local info = (#ok_list > 0 and ("The following modules were successfully unloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "")..
594 (#err_list > 0 and ("Failed to unload the following modules on host "..data.to..":\n"..t_concat(err_list, "\n")) or "");
595 return { status = "completed", info = info };
597 local modules = array.collect(keys(hosts[data.to].modules)):sort();
598 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = { layout = layout; values = { modules = modules } } }, "executing";
602 function activate_host_handler(self, data, state)
603 local layout = dataforms_new {
604 title = "Activate host";
607 { name = "FORM_TYPE", type = "hidden", value = "http://prosody.im/protocol/hosts#activate" };
608 { name = "host", type = "text-single", required = true, label = "Host:"};
611 if data.action == "cancel" then
612 return { status = "canceled" };
614 local fields, err = layout:data(data.form);
616 return generate_error_message(err);
618 local ok, err = hostmanager_activate(fields.host);
621 return { status = "completed", info = fields.host .. " activated" };
623 return { status = "canceled", error = err }
626 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = { layout = layout } }, "executing";
630 function deactivate_host_handler(self, data, state)
631 local layout = dataforms_new {
632 title = "Deactivate host";
635 { name = "FORM_TYPE", type = "hidden", value = "http://prosody.im/protocol/hosts#activate" };
636 { name = "host", type = "text-single", required = true, label = "Host:"};
639 if data.action == "cancel" then
640 return { status = "canceled" };
642 local fields, err = layout:data(data.form);
644 return generate_error_message(err);
646 local ok, err = hostmanager_deactivate(fields.host);
649 return { status = "completed", info = fields.host .. " deactivated" };
651 return { status = "canceled", error = err }
654 return { status = "executing", actions = {"next", "complete", default = "complete"}, form = { layout = layout } }, "executing";
659 local add_user_desc = adhoc_new("Add User", "http://jabber.org/protocol/admin#add-user", add_user_command_handler, "admin");
660 local change_user_password_desc = adhoc_new("Change User Password", "http://jabber.org/protocol/admin#change-user-password", change_user_password_command_handler, "admin");
661 local config_reload_desc = adhoc_new("Reload configuration", "http://prosody.im/protocol/config#reload", config_reload_handler, "global_admin");
662 local delete_user_desc = adhoc_new("Delete User", "http://jabber.org/protocol/admin#delete-user", delete_user_command_handler, "admin");
663 local end_user_session_desc = adhoc_new("End User Session", "http://jabber.org/protocol/admin#end-user-session", end_user_session_handler, "admin");
664 local get_user_password_desc = adhoc_new("Get User Password", "http://jabber.org/protocol/admin#get-user-password", get_user_password_handler, "admin");
665 local get_user_roster_desc = adhoc_new("Get User Roster","http://jabber.org/protocol/admin#get-user-roster", get_user_roster_handler, "admin");
666 local get_user_stats_desc = adhoc_new("Get User Statistics","http://jabber.org/protocol/admin#user-stats", get_user_stats_handler, "admin");
667 local get_online_users_desc = adhoc_new("Get List of Online Users", "http://jabber.org/protocol/admin#get-online-users", get_online_users_command_handler, "admin");
668 local list_modules_desc = adhoc_new("List loaded modules", "http://prosody.im/protocol/modules#list", list_modules_handler, "admin");
669 local load_module_desc = adhoc_new("Load module", "http://prosody.im/protocol/modules#load", load_module_handler, "admin");
670 local reload_modules_desc = adhoc_new("Reload modules", "http://prosody.im/protocol/modules#reload", reload_modules_handler, "admin");
671 local shut_down_service_desc = adhoc_new("Shut Down Service", "http://jabber.org/protocol/admin#shutdown", shut_down_service_handler, "global_admin");
672 local unload_modules_desc = adhoc_new("Unload modules", "http://prosody.im/protocol/modules#unload", unload_modules_handler, "admin");
673 local activate_host_desc = adhoc_new("Activate host", "http://prosody.im/protocol/hosts#activate", activate_host_handler, "global_admin");
674 local deactivate_host_desc = adhoc_new("Deactivate host", "http://prosody.im/protocol/hosts#deactivate", deactivate_host_handler, "global_admin");
676 module:provides("adhoc", add_user_desc);
677 module:provides("adhoc", change_user_password_desc);
678 module:provides("adhoc", config_reload_desc);
679 module:provides("adhoc", delete_user_desc);
680 module:provides("adhoc", end_user_session_desc);
681 module:provides("adhoc", get_user_password_desc);
682 module:provides("adhoc", get_user_roster_desc);
683 module:provides("adhoc", get_user_stats_desc);
684 module:provides("adhoc", get_online_users_desc);
685 module:provides("adhoc", list_modules_desc);
686 module:provides("adhoc", load_module_desc);
687 module:provides("adhoc", reload_modules_desc);
688 module:provides("adhoc", shut_down_service_desc);
689 module:provides("adhoc", unload_modules_desc);
690 module:provides("adhoc", activate_host_desc);
691 module:provides("adhoc", deactivate_host_desc);