diff options
author | siddharth <s@ricketyspace.net> | 2021-05-02 22:13:07 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2021-05-02 22:13:07 -0400 |
commit | ae508704925754cd6d325f7181fc759f5d4606d4 (patch) | |
tree | 1cbb721b7f479a44f48ac43b6fa1377890be9f87 /acmens.py | |
parent | 35bac7092628a200d28576f52e33c7dade5db14d (diff) |
acmens.py: add --version switch
Shows `acmens` version.
Diffstat (limited to 'acmens.py')
-rw-r--r-- | acmens.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -512,6 +512,7 @@ $ acmens --revoke --account-key user.key --crt domain.crt -------------- """, ) + parser.add_argument("--version", action="store_true", help="Show version and exit") parser.add_argument( "--revoke", action="store_true", help="Revoke a signed certificate" ) @@ -521,7 +522,6 @@ $ acmens --revoke --account-key user.key --crt domain.crt parser.add_argument( "-k", "--account-key", - required=True, help="path to your Let's Encrypt account private key", ) parser.add_argument( @@ -540,6 +540,12 @@ $ acmens --revoke --account-key user.key --crt domain.crt parser.add_argument("--crt", help="path to your signed certificate") args = parser.parse_args() + if args.version: + print("acmens v{}".format(__version__)) + sys.exit(0) + if args.account_key is None: + sys.stderr.write("Error: Path account key is required\n") + sys.exit(1) if (not args.revoke) and (args.csr is None): sys.stderr.write("Error: Path to CSR required\n") sys.exit(1) |