Software /
code /
prosody
Comparison
util/startup.lua @ 10604:3b0d9919f361
Merge 0.11->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 19 Jan 2020 16:01:29 +0000 |
parent | 10601:d8b51833926b |
parent | 10603:dbd60f473164 |
child | 10636:a9c975a0f113 |
comparison
equal
deleted
inserted
replaced
10601:d8b51833926b | 10604:3b0d9919f361 |
---|---|
16 local short_params = { D = "daemonize", F = "no-daemonize" }; | 16 local short_params = { D = "daemonize", F = "no-daemonize" }; |
17 local value_params = { config = true }; | 17 local value_params = { config = true }; |
18 | 18 |
19 function startup.parse_args() | 19 function startup.parse_args() |
20 local parsed_opts = {}; | 20 local parsed_opts = {}; |
21 prosody.opts = parsed_opts; | |
21 | 22 |
22 if #arg == 0 then | 23 if #arg == 0 then |
23 return; | 24 return; |
24 end | 25 end |
25 while true do | 26 while true do |
62 param_k, param_v = param, true; | 63 param_k, param_v = param, true; |
63 end | 64 end |
64 end | 65 end |
65 end | 66 end |
66 parsed_opts[param_k] = param_v; | 67 parsed_opts[param_k] = param_v; |
67 print("ARG", param_k, param_v); | 68 end |
68 end | |
69 prosody.opts = parsed_opts; | |
70 end | 69 end |
71 | 70 |
72 function startup.read_config() | 71 function startup.read_config() |
73 local filenames = {}; | 72 local filenames = {}; |
74 | 73 |