NIMBUS_RUN_DIR = os.path.join(NIMBUS_HOME, 'var/run/') if not os.path.isdir(NIMBUS_RUN_DIR): try: os.mkdir(NIMBUS_RUN_DIR) except: sys.exit("Failed to create run directory: %s" % NIMBUS_RUN_DIR) ProcessManager.init(dataDir = NIMBUS_RUN_DIR) if broker_enabled: NIMBUS_BROKER_EXE = os.path.join(NIMBUS_HOME, 'lib/run-broker.sh') if not os.path.exists(NIMBUS_BROKER_EXE): sys.exit("The broker executable does not exist: " + NIMBUS_BROKER_EXE) ProcessManager.add( Process( name = "broker", desc = "Nimbus Context Broker", program = NIMBUS_BROKER_EXE, args = [], workingDir = NIMBUS_HOME, postStartDelay=services_wait )) argv = sys.argv if len(argv) == 2: argv = argv[:] argv.insert(1, 'all') ProcessManager.main(argv=argv, usage=USAGE_TEXT)
try: os.mkdir(NIMBUS_RUN_DIR) except: sys.exit("Failed to create run directory: %s" % NIMBUS_RUN_DIR) ProcessManager.init(dataDir = NIMBUS_RUN_DIR) if services_enabled: NIMBUS_SERVICES_EXE = os.path.join(NIMBUS_HOME, 'libexec/run-services.sh') if not os.path.exists(NIMBUS_SERVICES_EXE): sys.exit("The services executable does not exist: " + NIMBUS_SERVICES_EXE) ProcessManager.add( Process( name = "services", desc = "Nimbus services", program = NIMBUS_SERVICES_EXE, args = [], workingDir = NIMBUS_HOME, postStartDelay=services_wait )) if web_enabled: NIMBUS_WEB_EXE = os.path.join(NIMBUS_HOME, 'libexec/run-web.sh') if not os.path.exists(NIMBUS_WEB_EXE): sys.exit("The web executable does not exist: " + NIMBUS_WEB_EXE) ProcessManager.add( Process( name = "web", desc = "Nimbus web application", program = NIMBUS_WEB_EXE, args = [], workingDir = NIMBUS_HOME, postStartDelay=3
except ConfigParser.NoOptionError: services_wait = 10 NIMBUS_RUN_DIR = os.path.join(NIMBUS_HOME, 'var/run/') if not os.path.isdir(NIMBUS_RUN_DIR): try: os.mkdir(NIMBUS_RUN_DIR) except: sys.exit("Failed to create run directory: %s" % NIMBUS_RUN_DIR) ProcessManager.init(dataDir=NIMBUS_RUN_DIR) if broker_enabled: NIMBUS_BROKER_EXE = os.path.join(NIMBUS_HOME, 'lib/run-broker.sh') if not os.path.exists(NIMBUS_BROKER_EXE): sys.exit("The broker executable does not exist: " + NIMBUS_BROKER_EXE) ProcessManager.add( Process(name="broker", desc="Nimbus Context Broker", program=NIMBUS_BROKER_EXE, args=[], workingDir=NIMBUS_HOME, postStartDelay=services_wait)) argv = sys.argv if len(argv) == 2: argv = argv[:] argv.insert(1, 'all') ProcessManager.main(argv=argv, usage=USAGE_TEXT)