def main(): pids = status.getServerPids() if len(pids): status.serverAlreadyRunning(pids, 'Unable to start server. It is already running') else: cmd = 'nohup coffee production.coffee > server.log 2>&1&' os.popen(cmd) time.sleep(0.5) buf = open('server.log','r').read() print buf
def main(): pids = status.getServerPids() if len(pids): status.serverAlreadyRunning(pids, 'Unable to start Redis Server. It is already running') else: cmd = 'redis-server config/redis.conf' buf = os.popen(cmd).read(); if ( len(buf) == 0 ): print '\nRedis Server started\n' else: print buf
def main(): pids = status.getServerPids() if len(pids): status.serverAlreadyRunning( pids, 'Unable to start server. It is already running') else: cmd = 'nohup coffee production.coffee > server.log 2>&1&' os.popen(cmd) time.sleep(0.5) buf = open('server.log', 'r').read() print buf
def main(): pids = status.getServerPids() if len(pids): status.serverAlreadyRunning( pids, 'Unable to start Redis Server. It is already running') else: cmd = 'redis-server config/redis.conf' buf = os.popen(cmd).read() if (len(buf) == 0): print '\nRedis Server started\n' else: print buf