projects
/
certmaster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30ba30e
)
add support for --version to certmaster daemon
author
Adrian Likins
<alikins@redhat.com>
Thu, 11 Jun 2009 20:36:39 +0000
(16:36 -0400)
committer
Adrian Likins
<alikins@redhat.com>
Thu, 11 Jun 2009 20:36:39 +0000
(16:36 -0400)
certmaster/certmaster.py
patch
|
blob
|
history
diff --git
a/certmaster/certmaster.py
b/certmaster/certmaster.py
index
58cb50b
..
9548b8b
100644
(file)
--- 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)