prosodyctl
changeset 2696 cb5acafbec62
parent 2587 c37f971f0fe6
child 2705 8a5af6f14c07
equal deleted inserted replaced
2694:a6d80b6e9ee1 2696:cb5acafbec62
   431 
   431 
   432 	show_message(error_messages[ret]);
   432 	show_message(error_messages[ret]);
   433 	return 1;
   433 	return 1;
   434 end
   434 end
   435 
   435 
       
   436 function commands.restart(arg)
       
   437 	if arg[1] == "--help" then
       
   438 		show_usage([[stop]], [[Stop and start a running Prosody server]]);
       
   439 		return 1;
       
   440 	end
       
   441 	
       
   442 	local ret = commands.stop(arg);
       
   443 	if ret == 0 then
       
   444 		ret = commands.start(arg);
       
   445 	end
       
   446 	return ret;
       
   447 end
       
   448 
   436 -- ejabberdctl compatibility
   449 -- ejabberdctl compatibility
   437 
   450 
   438 function commands.register(arg)
   451 function commands.register(arg)
   439 	local user, host, password = unpack(arg);
   452 	local user, host, password = unpack(arg);
   440 	if (not (user and host)) or arg[1] == "--help" then
   453 	if (not (user and host)) or arg[1] == "--help" then