(Not working yet, but the changeset was getting too big: The service starts, but...
[certmaster.git] / scripts / certmaster-request
index b40a66c..4c14443 100755 (executable)
@@ -16,8 +16,21 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 """
 
 import distutils.sysconfig
+import optparse
 
 from certmaster import requester
 
 if __name__ == "__main__":
-    requester.request_cert()
+    parser = optparse.OptionParser()
+
+    parser.add_option('--hostname', action="store", dest="hostname",
+        metavar="NAME", 
+        help='hostname to use as the CN for the certificate')
+    
+    parser.add_option('--ca', action="store", dest="ca", default='',
+        metavar="CA", 
+        help='certificate authority used to sign the certificate')
+    
+    (opts, args) = parser.parse_args()
+
+    requester.request_cert(hostname=opts.hostname, ca=opts.ca)