コード例 #1
0
ファイル: start.py プロジェクト: anandgeorge/CoreJS
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
コード例 #2
0
ファイル: start.py プロジェクト: anandgeorge/CoreJS
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
コード例 #3
0
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
コード例 #4
0
ファイル: start.py プロジェクト: twilson63/CoreJS
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