Software /
code /
prosody
Comparison
util/prosodyctl.lua @ 4335:3a2a01432b5c
Add "reload" command to prosodyctl
author | Vladimir Protasov <eoranged@ya.ru> |
---|---|
date | Thu, 04 Aug 2011 21:26:15 +0400 |
parent | 4142:caa78589598f |
child | 4485:abfd27b59fa8 |
child | 4499:55ef5d83d00a |
comparison
equal
deleted
inserted
replaced
4334:cd1b73582711 | 4335:3a2a01432b5c |
---|---|
236 if not ok then return false, pid; end | 236 if not ok then return false, pid; end |
237 | 237 |
238 signal.kill(pid, signal.SIGTERM); | 238 signal.kill(pid, signal.SIGTERM); |
239 return true; | 239 return true; |
240 end | 240 end |
241 | |
242 function reload() | |
243 local ok, ret = _M.isrunning(); | |
244 if not ok then | |
245 return ok, ret; | |
246 end | |
247 if not ret then | |
248 return false, "not-running"; | |
249 end | |
250 | |
251 local ok, pid = _M.getpid() | |
252 if not ok then return false, pid; end | |
253 | |
254 signal.kill(pid, signal.SIGHUP); | |
255 return true; | |
256 end |