fixed server.key/cert path
authorTony Mack <tmack@cs.princeton.edu>
Wed, 20 May 2009 00:18:07 +0000 (00:18 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Wed, 20 May 2009 00:18:07 +0000 (00:18 +0000)
geni/plc.py

index 8565fee..31df0d0 100644 (file)
@@ -37,11 +37,11 @@ from optparse import OptionParser
 from geni.util.hierarchy import Hierarchy
 from geni.util.trustedroot import TrustedRootList
 from geni.util.cert import Keypair, Certificate
+from geni.util.config import Config
 from geni.registry import Registry
 from geni.aggregate import Aggregate
 from geni.slicemgr import SliceMgr
 
-
 # after http://www.erlenstar.demon.co.uk/unix/faq_2.html
 def daemon():
     """Daemonize the current process."""
@@ -76,9 +76,11 @@ def main():
     parser.add_option("-d", "--daemon", dest="daemon", action="store_true",
          help="Run as daemon.", default=False)
     (options, args) = parser.parse_args()
-    key_file = "server.key"
-    cert_file = "server.cert"
+
+    config = Config()
+    path = config.path 
+    key_file = path + os.sep + "server.key"
+    cert_file = path + os.sep + "server.cert"
     
     if (options.daemon):  daemon()