Software / code / prosody
Comparison
prosodyctl @ 13646:4e7ac0e8dfc4
prosodyctl: stop: Fix detection of whether Prosody is running
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 06 Feb 2025 14:35:29 +0000 |
| parent | 13645:7f6f0e47624a |
| child | 13648:0b37ce3e40cd |
comparison
equal
deleted
inserted
replaced
| 13645:7f6f0e47624a | 13646:4e7ac0e8dfc4 |
|---|---|
| 301 return 0; | 301 return 0; |
| 302 end | 302 end |
| 303 | 303 |
| 304 service_command_warning("stop"); | 304 service_command_warning("stop"); |
| 305 | 305 |
| 306 if not prosodyctl.isrunning() then | 306 local ok, running = prosodyctl.isrunning(); |
| 307 if not ok then | |
| 308 show_message(error_messages[running]); | |
| 309 return 1; | |
| 310 elseif not running then | |
| 307 show_message("Prosody is not running"); | 311 show_message("Prosody is not running"); |
| 308 return 1; | 312 return 1; |
| 309 end | 313 end |
| 310 | 314 |
| 311 local ok, ret = prosodyctl.stop(); | 315 local ok, ret = prosodyctl.stop(); |