diff --git a/.travis.yml b/.travis.yml index 54ed84263..4ef4bb735 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,3 +24,4 @@ env: notifications: email: false + irc: "chat.freenode.net#letsencrypt" diff --git a/README.md b/README.md index 85b176b58..320943156 100644 --- a/README.md +++ b/README.md @@ -116,32 +116,10 @@ documentation: ## Command line usage +The letsencrypt commandline tool has a builtin help: + ``` -usage: sudo letsencrypt.py [-h] [-d DOMAIN [DOMAIN ...]] [-s SERVER] [-p PRIVKEY] - [-c CSR] [-b ROLLBACK] [-k] [-v] [-r] [-n] [-e] [-t] - [--test] - -An ACME client that can update Apache configurations. - -optional arguments: - -h, --help show this help message and exit - -d DOMAIN [DOMAIN ...], --domains DOMAIN [DOMAIN ...] - -s SERVER, --server SERVER - The ACME CA server address. - -p PRIVKEY, --privkey PRIVKEY - Path to the private key file for certificate - generation. - -b N, --rollback N Revert configuration N number of checkpoints. - -k, --revoke Revoke a certificate. - -v, --view-config-changes - View checkpoints and associated configuration changes. - -r, --redirect Automatically redirect all HTTP traffic to HTTPS for - the newly authenticated vhost. - -n, --no-redirect Skip the HTTPS redirect question, allowing both HTTP - and HTTPS. - -e, --agree-eula Skip the end user license agreement screen. - -t, --text Use the text output instead of the curses UI. - --test Run in test mode. +letsencrypt --help ``` ## More Information diff --git a/letsencrypt/scripts/main.py b/letsencrypt/scripts/main.py index 6d7f0d336..95c5cc8b6 100755 --- a/letsencrypt/scripts/main.py +++ b/letsencrypt/scripts/main.py @@ -18,11 +18,6 @@ from letsencrypt.client import log def main(): # pylint: disable=too-many-statements,too-many-branches """Command line argument parsing and main script execution.""" - if not os.geteuid() == 0: - sys.exit( - "{0}Root is required to run letsencrypt. Please use sudo.{0}" - .format(os.linesep)) - parser = argparse.ArgumentParser( description="An ACME client that can update Apache configurations.") @@ -62,8 +57,15 @@ def main(): # pylint: disable=too-many-statements,too-many-branches parser.add_argument("--test", dest="test", action="store_true", help="Run in test mode.") + # note: arg parser internally handles --help (and exits afterwards) args = parser.parse_args() + # note: check is done after arg parsing as --help should work w/o root also. + if not os.geteuid() == 0: + sys.exit( + "{0}Root is required to run letsencrypt. Please use sudo.{0}" + .format(os.linesep)) + # Set up logging logger = logging.getLogger() logger.setLevel(logging.INFO)