Comparison

prosodyctl @ 13645:7f6f0e47624a

prosodyctl: reload: Fix detection of whether prosody is running isrunning() returns two values (success, status) and we were only checking the first one.
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 Feb 2025 14:34:47 +0000
parent 13644:263ae995bc86
child 13646:4e7ac0e8dfc4
comparison
equal deleted inserted replaced
13644:263ae995bc86 13645:7f6f0e47624a
513 return shell.shell(arg); 513 return shell.shell(arg);
514 end 514 end
515 return shell.shell({ "config", "reload" }); 515 return shell.shell({ "config", "reload" });
516 end 516 end
517 517
518 service_command_warning("reload"); 518 local ok, running = prosodyctl.isrunning();
519 519 if not ok then
520 if not prosodyctl.isrunning() then 520 show_message(error_messages[running]);
521 return 1;
522 elseif not running then
521 show_message("Prosody is not running"); 523 show_message("Prosody is not running");
522 return 1; 524 return 1;
523 end 525 end
524 526
525 local ok, ret = prosodyctl.reload(); 527 local ok, ret = prosodyctl.reload();