aboutsummaryrefslogtreecommitdiffstats
path: root/util/startup.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.startup: Teach prosodyctl to be completely --silentKim Alvefur2021-11-281-0/+3
|
* util.startup: Teach prosodyctl to be --quiet as complement to --verboseKim Alvefur2021-11-281-1/+7
| | | | | | | | Original motivation was tiresome warnings about Lua 5.4 not being supported yet. Can still be handy to tweak log level, e.g. to prevent logging to interfere with command output.
* util.startup: Allow supplying an argument parsing settingsKim Alvefur2022-01-091-2/+2
| | | | | | The 'prosody' global is not global this early so there was no way to override the process type field or argument parsing settings from outside, e.g. from the migrator.
* util.startup: Initialize util.async at startupMatthew Wild2021-11-291-0/+9
|
* util.startup: Integrate util.promise with net.server main loopKim Alvefur2019-01-051-0/+8
|
* util.startup: Understand -h, -? as --help in prosodyctl but ignoreKim Alvefur2021-10-251-1/+1
| | | | | prosodyctl -h showing an error was not very helpful, especially since prosodyctl shows its help for any unknown (or none) command.
* util.startup: Show brief usage on `prosody -h|-?|--help`Kim Alvefur2021-10-251-1/+8
| | | | | Seems more suitable than asking if prosodyctl was meant to be used, or going ahead and starting.
* util.startup: Skip config readability check in migrator (thanks eTaurus)Kim Alvefur2021-10-231-1/+1
| | | | | | This field is empty for reasons when invoked by prosody-migrator, which threw an error: > bad argument #1 to 'open' (string expected, got nil)
* util.startup: Only ask if 'prosodyctl' was meant instead of 'prosody' (fix ↵Kim Alvefur2021-10-121-1/+3
| | | | #1692)
* util.startup: Allow separate command line argument settings for prosody and ↵Kim Alvefur2021-09-301-6/+11
| | | | | | | prosodyctl Makes it clearer that prosody does not take -v atm, as well as how prosodyctl does not take the demonization flags.
* prosodyctl: Add support for -v/--verbose to enable debug loggingKim Alvefur2021-09-301-2/+4
| | | | More convenient than the environment variable.
* Merge 0.11->trunkMatthew Wild2021-05-131-1/+7
|\
| * util.startup: Set more aggressive defaults for GCMatthew Wild2021-05-071-1/+7
| | | | | | | | | | | | | | | | | | Testing has demonstrated that the default GC parameters are not sufficient to prevent runaway memory growth when running under Lua 5.2 and Lua 5.3. Setting the GC speed to 500 was tested on Lua versions 5.1->5.4 and did not display unbounded memory growth.
| * util.startup: Configure the GC on startup, using the config or built-in defaultsMatthew Wild2020-06-151-0/+17
| |
* | util.startup: Make installer_plugin_path relative to data directoryKim Alvefur2021-01-241-3/+2
| | | | | | | | | | | | Having it relative to current working directory is problematic since this depends on how Prosody was started and changes to the data directory during startup (but after this point).
* | util.startup: Don't create installer plugin path (as root)Kim Alvefur2021-01-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Since this runs before dropping root, the directory ends up being owned by root, resulting in luarocks failing to install anything, since by then it would be running as the prosody user. luarocks creates this directory if needed, so creating it during startup is not necessary. One potential issue is if the directory is somewhere where Prosody can't write, but then you will simply have to create it yourself with the appropriate permissions.
* | util.startup: Handle missing nparams field from debug info (not present in 5.1)Matthew Wild2020-10-111-2/+3
| |
* | util.startup: Include arguments in function string representationKim Alvefur2020-10-091-2/+8
| | | | | | | | | | | | | | Improves usability of the console when digging around the internals. No specific rationale for the function<file:line>(args) format, it looked best of the variants I tried.
* | util.startup: Retrieve less data for function string representationKim Alvefur2020-10-091-1/+1
| | | | | | | | debug.getinfo(f) collects more info than what is needed here.
* | util.startup: Save the path used by the installer to prosody.pathsKim Alvefur2020-10-071-0/+1
| | | | | | | | | | | | Makes it easier for other parts of the code to use this for things, such as determining whether a certain module is from this path or from elsewhere.
* | util.startup: Fix startup failure if CFG_DATADIR is unsetKim Alvefur2020-10-051-1/+1
| | | | | | | | As is normal when running from source
* | util.startup: Re-enable installer path setupKim Alvefur2020-10-051-2/+2
| |
* | util.startup: Put 'installer_plugin_path' under data directory by defaultKim Alvefur2020-10-051-1/+1
| | | | | | | | | | Fixes issue where it ends up creating this in $PWD, which might be ~prosody, ~you or /, depending on how it's invoked.
* | util.startup: Init util.error with defaults if none givenMatthew Wild2020-08-281-1/+1
| |
* | util.error: Allow optional tracebacks to be injected on errorsMatthew Wild2020-08-281-0/+6
| | | | | | | | This allows extra debug info to be provided for development purposes.
* | Merge 0.11->trunkKim Alvefur2020-06-231-1/+0
|\|
| * util.startup: Remove duplicated initialization of logging (fix #1527)Kim Alvefur2020-06-221-1/+0
| |
* | util.argparse: Move exiting and error to util.startupKim Alvefur2020-06-171-1/+11
| | | | | | | | | | | | | | | | It's not so nice to have a library that exits the entire application from under you, so this and the error reporting belongs in util.startup. The argparse code was originally in util.startup but moved out in 1196f1e8d178 but the error handling should have stayed.
* | util.startup: Configure the GC on startup, using the config or built-in defaultsMatthew Wild2020-06-151-0/+17
| |
* | util.startup: Break out command line argument parsing into util.argparseKim Alvefur2020-02-191-49/+5
| | | | | | | | | | This will allow using it from other places such as prosodyctl sub-commands and plugins
* | util.startup: expose current process type (prosody/prosodyctl) in the global ↵Matthew Wild2020-01-281-0/+2
| | | | | | | | prosody object
* | Merge 0.11->trunkMatthew Wild2020-01-191-2/+1
|\|
| * util.startup: Ensure prosody.opts exists even when no options provided0.11.5Matthew Wild2020-01-191-1/+1
| |
| * util.startup: Remove accidentally-committed debuggingMatthew Wild2020-01-191-1/+0
| |
* | Merge 0.11->trunkMatthew Wild2020-01-191-37/+39
|\|
| * util.startup: Fix logic to make --config work againMatthew Wild2020-01-191-37/+39
| |
* | Merge 0.11->trunkMatthew Wild2020-01-191-6/+60
|\|
| * prosody/util.startup: Switch to parse_args() for --root and --configMatthew Wild2020-01-191-6/+6
| |
| * util.startup: Add startup step for parsing command-line optionsMatthew Wild2020-01-191-0/+54
| |
* | util.startup: Ignore unused errno variable [luacheck]Kim Alvefur2019-12-231-1/+1
| |
* | util.startup: Disable plugin installer path creation for now (see comments)Kim Alvefur2019-11-091-2/+4
| |
* | util.startup: Split plugin installer path setup into a separate functionKim Alvefur2019-11-091-4/+11
| |
* | Merge 0.11->trunkKim Alvefur2019-11-041-2/+9
|\|
| * util.startup: Ensure prosody.paths are absolute (see #1430)Kim Alvefur2019-11-041-1/+7
| | | | | | | | | | | | | | | | Normally these paths are injected into the installed 'prosody' executable as absolute paths, but it is possible to override at least the config path via environment variable or command line argument. This makes sure a path relative to pwd stays relative to that instead of the data directory.
| * util.startup: Update config path (fixes #1430)Kim Alvefur2019-11-031-1/+2
| |
* | Merge mod-installer (2019 GSoC by João Duarte)Matthew Wild2019-08-191-1/+7
|\ \
| * | util.startup: Changed the way util.paths.complement_lua_path was being accessedJoão Duarte2019-08-161-1/+1
| | |
| * | util.startup: Reorganized code at setup_plugindirJoão Duarte2019-08-011-3/+3
| | |
| * | util.startup: Now calls a function to complement lua's path/cpathJoão Duarte2019-08-011-13/+2
| | |
| * | util.startup: setup_plugindir now also checks package.cpath for duplicatesJoão Duarte2019-08-011-2/+4
| | |