mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 18:34:41 +02:00
Add --help option
This commit is contained in:
+26
-2
@@ -23,7 +23,7 @@ def main():
|
||||
"revoke", "agree-eula",
|
||||
"redirect",
|
||||
"no-redirect",
|
||||
"max-security"])
|
||||
"help"])
|
||||
except getopt.GetoptError as err:
|
||||
# print help info and exit
|
||||
print str(err)
|
||||
@@ -72,6 +72,8 @@ def main():
|
||||
redirect = False
|
||||
elif o == "--agree-eula":
|
||||
eula = True
|
||||
elif o == "--help":
|
||||
print_options()
|
||||
elif o == "--test":
|
||||
#put any temporary tests in here
|
||||
continue
|
||||
@@ -91,7 +93,29 @@ def main():
|
||||
c.authenticate(args, redirect, eula)
|
||||
|
||||
def usage():
|
||||
print "Available options: --text, --privkey=, --csr=, --server=, --rollback=, --view-checkpoints, --revoke, --agree-eula, --redirect, --no-redirect, --max-security"
|
||||
s = "Available options: --text, --privkey=, --csr=, --server=, "
|
||||
s += "--rollback=, --view-checkpoints, --revoke, --agree-eula, --redirect,"
|
||||
s += " --no-redirect, --help"
|
||||
print str
|
||||
|
||||
def print_options():
|
||||
print "\nsudo ./letsencrypt.py (default authentication mode using pythondialog)"
|
||||
options = [ "privkey= (specify privatekey file to use to generate the certificate)",
|
||||
"csr= (Use a specific CSR. If this is specified, privkey " +
|
||||
"must also be specified with the correct private key for the CSR)",
|
||||
"server (list the ACME CA server address)",
|
||||
"revoke (revoke a certificate)",
|
||||
"view-checkpoints (Used to view available checkpoints and " +
|
||||
"see what configuration changes have been made)",
|
||||
"rollback=X (Revert the configuration X number of checkpoints)",
|
||||
"redirect (Automatically redirect all HTTP traffic to " +
|
||||
"HTTPS for the newly authenticated vhost)",
|
||||
"no-redirect (Skip the HTTPS redirect question, " +
|
||||
"allowing both HTTP and HTTPS)",
|
||||
"agree-eula (Skip the end user agreement screen)" ]
|
||||
for o in options:
|
||||
print " --%s" % o
|
||||
sys.exit(0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user