-
Notifications
You must be signed in to change notification settings - Fork 18
Commandline Reference
molecule edited this page Jun 10, 2016
·
3 revisions
Usage: coilmq [options]
Options:
-c, --config FILE Read configuration from FILE. (CLI options override
config file.)
-b, --host ADDR Listen on specified address (default 127.0.0.1)
-p, --port PORT Listen on specified port (default 61613)
-l, --logfile FILE Log to specified file (unless logging configured in
config file).
--debug TEXT Sets logging to debug (unless logging configured in
config file).
-d, --daemon TEXT Run server as a daemon (default False).
-u, --uid UID The user/UID to use for daemon process.
-g, --gid GID The group/GID to use for daemon process.
--pidfile FILE The PID file to use.
--umask MASK Umask (octal) to apply for daemonized process.
--rundir DIR The working directory to use for the daemonized process
(default /).
--help Show this message and exit.
Note that when options are specified on the commandline and in a config file, the options on the commanline will typically override. The one exception is logging; if you add [logging]
info to your config file, that will take precedence over the --logfile
and --debug
parameters.
Notes about running as daemon
We are using the python-daemon package to handle the daemonization. This has a few behaviors (more related to general unix daemons) that you should probably be aware of:
- You will have to run as root if you want to use non-high ports (on unix).
- The forking will close stderr and stdout. This can make errors in logging configuration very hard to diagnose (because you have no logging). Specifically note that if you are not running as
root
you need to be aware that the working directory is set to / by default; this means, for example, that if you are trying to log to./coilmq.log
you will likely get a daemon that immediately (and quietly) terminates. Use syslog.