From 31cc0f346dc740d416c6d174ad6bd40e0765ee7a Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Thu, 11 Jun 2009 16:36:39 -0400 Subject: [PATCH] add support for --version to certmaster daemon --- certmaster/certmaster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/certmaster/certmaster.py b/certmaster/certmaster.py index 58cb50b..9548b8b 100644 --- a/certmaster/certmaster.py +++ b/certmaster/certmaster.py @@ -352,12 +352,15 @@ def main(argv): sys.excepthook = excepthook cm = CertMaster('/etc/certmaster/certmaster.conf') + if "--version" in sys.argv or "-v" in sys.argv: + print >> sys.stderr, file("/etc/certmaster/version").read().strip() + sys.exit(0) + if "daemon" in argv or "--daemon" in argv: utils.daemonize("/var/run/certmaster.pid") else: print "serving...\n" - # just let exceptions bubble up for now serve(cm) -- 2.39.5