diff --git a/deluge/core/daemon_entry.py b/deluge/core/daemon_entry.py index 952098b0a..fbb7a90c6 100644 --- a/deluge/core/daemon_entry.py +++ b/deluge/core/daemon_entry.py @@ -22,24 +22,23 @@ from deluge.ui.util import lang def add_daemon_options(parser): group = parser.add_argument_group(_("Daemon Options")) + group.add_argument("-u", "--ui-interface", metavar="", action="store", + help=_("IP address to listen for UI connections")) group.add_argument("-p", "--port", metavar="", action="store", type=int, - help=_("The port the daemon will listen on")) - group.add_argument("-i", "--interface", metavar="", dest="listen_interface", action="store", - help=_("Interface daemon will listen for bittorrent connections on, must be an IP address")) - group.add_argument("-u", "--ui-interface", metavar="", action="store", - help=_("Interface daemon will listen for UI connections on, must be an IP address")) + help=_("Port to listen for UI connections on")) + group.add_argument("-i", "--interface", metavar="", dest="listen_interface", action="store", + help=_("IP address to listen for BitTorrent connections")) + group.add_argument("-P", "--pidfile", metavar="", action="store", + help=_("Pidfile to store the process id")) if not deluge.common.windows_check(): group.add_argument("-d", "--do-not-daemonize", dest="donot", action="store_true", - help=_("Do not fork or daemonize the daemon process")) - group.add_argument("-P", "--pidfile", metavar="", action="store", - help=_("Use a pidfile to store process id")) - if not deluge.common.windows_check(): + help=_("Do not daemonize (fork) this process")) group.add_argument("-U", "--user", metavar="", action="store", - help=_("User to switch to. Only use it when starting as root")) + help=_("Change to this user on startup (Requires root)")) group.add_argument("-g", "--group", metavar="", action="store", - help=_("Group to switch to. Only use it when starting as root")) - group.add_argument("--read-only-config-keys", action="store", type=str, default="", - help=_("List of comma-separated config keys that will not be modified by set_config RPC.")) + help=_("Change to this group on startup (Requires root)")) + group.add_argument("--read-only-config-keys", metavar="", action="store", + help=_("Config keys to be unmodified by `set_config` RPC"), type=str, default="") def start_daemon(skip_start=False): diff --git a/deluge/ui/baseargparser.py b/deluge/ui/baseargparser.py index 5bfdee8f0..7047a32ca 100644 --- a/deluge/ui/baseargparser.py +++ b/deluge/ui/baseargparser.py @@ -95,25 +95,26 @@ class BaseArgParser(argparse.ArgumentParser): self.common_setup = False self.group = self.add_argument_group(_("Common Options")) + self.group.add_argument("-h", "--help", action=HelpAction, + help=_("Print this help message")) self.group.add_argument("-V", "--version", action="version", version="%(prog)s " + get_version(), - help=_("Show program's version info and exit")) + help=_("Print version information")) self.group.add_argument("-v", action="version", version="%(prog)s " + get_version(), help=argparse.SUPPRESS) # Deprecated arg - self.group.add_argument("-c", "--config", action="store", metavar="", + self.group.add_argument("-c", "--config", metavar="", help=_("Set the config directory path")) - self.group.add_argument("-l", "--logfile", action="store", metavar="", + self.group.add_argument("-l", "--logfile", metavar="", help=_("Output to specified logfile instead of stdout")) - self.group.add_argument("-L", "--loglevel", action="store", choices=deluge.log.levels, metavar="", - help=_("Set the log level: %s" % ", ".join(deluge.log.levels))) - self.group.add_argument("--logrotate", action="store", nargs="?", const="2M", metavar="", + self.group.add_argument("-L", "--loglevel", choices=deluge.log.levels, metavar="", + help=_("Set the log level (none, error, warning, info, debug)")) + self.group.add_argument("--logrotate", nargs="?", const="2M", metavar="", help=_("Enable logfile rotation, with optional maximum logfile size, " "default: %(const)s (Logfile rotation count is 5)")) - self.group.add_argument("-q", "--quiet", action="store_true", default=False, - help=_("Quieten logging output, equal to `--loglevel none`")) - self.group.add_argument("--profile", metavar="", action="store", nargs="?", default=False, - help=_("Profile %(prog)s with cProfile. Prints results to stdout " + self.group.add_argument("-q", "--quiet", action="store_true", + help=_("Quieten logging output (Same as `--loglevel none`)")) + self.group.add_argument("--profile", metavar="", nargs="?", default=False, + help=_("Profile %(prog)s with cProfile. Outputs to stdout " "unless a filename is specified")) - self.group.add_argument("-h", "--help", action=HelpAction, help=_("Show this help message and exit")) def parse_args(self, *args): options, remaining = super(BaseArgParser, self).parse_known_args(*args) diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py index fea7589cf..e1441f62a 100644 --- a/deluge/ui/web/web.py +++ b/deluge/ui/web/web.py @@ -36,33 +36,32 @@ class Web(UI): super(Web, self).__init__("web", *args, **kwargs) self.__server = None - group = self.parser.add_argument_group(_("Web Options")) - - group.add_argument("-b", "--base", metavar="", action="store", default=None, - help=_("Set the base path that the ui is running on (proxying)")) + group = self.parser.add_argument_group(_("Web Server Options")) + group.add_argument("-i", "--interface", metavar="", action="store", + help=_("IP address for web server to listen on")) + group.add_argument("-p", "--port", metavar="", type=int, action="store", + help=_("Port for web server to listen on")) + group.add_argument("-P", "--pidfile", metavar="", action="store", + help=_("Pidfile to store the process id")) if not windows_check(): - group.add_argument("-d", "--do-not-daemonize", dest="donotdaemonize", action="store_true", default=False, - help=_("Do not daemonize the web interface")) - group.add_argument("-f", "--fork", dest="donotdaemonize", action="store_false", help=argparse.SUPPRESS) - group.add_argument("-P", "--pidfile", metavar="", action="store", default=None, - help=_("Use pidfile to store process id")) - if not windows_check(): - group.add_argument("-U", "--user", metavar="", action="store", default=None, - help=_("User to switch to. Only use it when starting as root")) - group.add_argument("-g", "--group", metavar="", action="store", default=None, - help=_("Group to switch to. Only use it when starting as root")) - group.add_argument("-i", "--interface", metavar="", action="store", default=None, - help=_("Binds the webserver to a specific IP address")) - group.add_argument("-p", "--port", metavar="", type=int, action="store", default=None, - help=_("Sets the port to be used for the webserver")) + group.add_argument("-d", "--do-not-daemonize", dest="donotdaemonize", action="store_true", + help=_("Do not daemonize (fork) this process")) + group.add_argument("-f", "--fork", dest="donotdaemonize", action="store_false", + help=argparse.SUPPRESS) # Deprecated arg + group.add_argument("-U", "--user", metavar="", action="store", + help=_("Change to this user on startup (Requires root)")) + group.add_argument("-g", "--group", metavar="", action="store", + help=_("Change to this group on startup (Requires root)")) + group.add_argument("-b", "--base", metavar="", action="store", + help=_("Set the base path that the ui is running on")) try: import OpenSSL assert OpenSSL.__version__ except ImportError: pass else: - group.add_argument("--ssl", action="store_true", help=_("Forces the webserver to use ssl")) - group.add_argument("--no-ssl", action="store_true", help=_("Forces the webserver to disable ssl")) + group.add_argument("--ssl", action="store_true", help=_("Force the web server to use SSL")) + group.add_argument("--no-ssl", action="store_true", help=_("Force the web server to disable SSL")) @property def server(self):