Software /
code /
prosody
Comparison
util/prosodyctl.lua @ 10167:f343ed1f02fd
util.prosodyctl: Created the helper function get_path_custom_plugins
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Wed, 24 Jul 2019 11:20:35 -0700 |
parent | 10158:2cb48153f9e0 |
child | 10180:152604d54732 |
comparison
equal
deleted
inserted
replaced
10166:4d1206ac0d41 | 10167:f343ed1f02fd |
---|---|
284 local ok, pid = getpid() | 284 local ok, pid = getpid() |
285 if not ok then return false, pid; end | 285 if not ok then return false, pid; end |
286 | 286 |
287 signal.kill(pid, signal.SIGHUP); | 287 signal.kill(pid, signal.SIGHUP); |
288 return true; | 288 return true; |
289 end | |
290 | |
291 local function get_path_custom_plugins(plugin_paths) | |
292 -- I'm considering that we are using just one path to custom plugins, and it is the first in prosody.paths.plugins, for now | |
293 -- luacheck: ignore 512 | |
294 for path in plugin_paths:gmatch("[^;]+") do | |
295 return path | |
296 end | |
289 end | 297 end |
290 | 298 |
291 return { | 299 return { |
292 show_message = show_message; | 300 show_message = show_message; |
293 show_warning = show_message; | 301 show_warning = show_message; |
306 getpid = getpid; | 314 getpid = getpid; |
307 isrunning = isrunning; | 315 isrunning = isrunning; |
308 start = start; | 316 start = start; |
309 stop = stop; | 317 stop = stop; |
310 reload = reload; | 318 reload = reload; |
319 get_path_custom_plugins = get_path_custom_plugins; | |
311 }; | 320 }; |