Merge branch 'master' into reverter

This commit is contained in:
James Kasten
2015-01-25 23:04:37 -08:00
3 changed files with 11 additions and 30 deletions
+1
View File
@@ -24,3 +24,4 @@ env:
notifications:
email: false
irc: "chat.freenode.net#letsencrypt"
+3 -25
View File
@@ -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
+7 -5
View File
@@ -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)