bin/iro-install
branchdevel
changeset 270 665c3ea02d35
parent 237 eb3501d2cdc9
child 284 f3be8a77b3e2
equal deleted inserted replaced
269:0d134b173cb1 270:665c3ea02d35
    48 if not install.checkDatabase():
    48 if not install.checkDatabase():
    49     logging.error("Database not in right format.")
    49     logging.error("Database not in right format.")
    50     if args.install:
    50     if args.install:
    51         install.createDatabase()
    51         install.createDatabase()
    52         logging.info("Database layout created.")
    52         logging.info("Database layout created.")
    53         logging.info("Now you can run "+sys.argv[0])
       
    54     else:
    53     else:
    55         logging.info("Please edit iro.conf and run %s --install"%sys.argv[0])
    54         logging.info("Please edit iro.conf and run %s --install"%sys.argv[0])
    56         sys.exit(1)
    55         sys.exit(1)
    57 
    56 
    58 routes = [ s for s in config.configParser.sections() if not s in ["main",]]
    57 routes = [ s for s in config.configParser.sections() if not s in ["main",]]
    63     if args.install or args.update:
    62     if args.install or args.update:
    64         ao = install.getAllRoutes(routes,True)
    63         ao = install.getAllRoutes(routes,True)
    65         for a in  ao["added"]:
    64         for a in  ao["added"]:
    66             logging.info("Added Offer(%s)"%a)
    65             logging.info("Added Offer(%s)"%a)
    67         logging.info('Updated offerlist.')
    66         logging.info('Updated offerlist.')
    68         logging.info("Now you can run "+sys.argv[0])
       
    69     else:
    67     else:
    70         logging.warning('offerlist is not up-to-date.')
    68         logging.warning('offerlist is not up-to-date.')
    71         logging.info("Please run %s --update"%sys.argv[0])
    69         logging.info("Please run %s --update"%sys.argv[0])
    72     sys.exit(1)
    70         sys.exit(1)
    73 
       
    74 if args.install or args.update:
       
    75     logging.info('Nothing todo for me.')
       
    76     logging.info("Now you can run "+sys.argv[0])
       
    77     sys.exit(1)
       
    78 
    71 
    79 logging.info("You can just start your iro server.")
    72 logging.info("You can just start your iro server.")
    80 
    73 
    81 #start via cmdline
       
    82 #root = resource.Resource()
       
    83 #root = xmlrpc.appendResource(root)
       
    84 
    74 
    85 #v2 = resource.Resource()
       
    86 #v2 = xmlrpc.appendResource(root)
       
    87 #root.putChild('2.0', v2)
       
    88 
       
    89 #reactor.callLater(0.2, config.readConfig)
       
    90 #main.runReactor(reactor, engine, config.main.port, root)