def restart(config): quiet = config['quiet'] if not base.isBuildslaveDir(config['basedir']): sys.exit(1) from buildslave.scripts.startup import start if not stop(config, wait=True, returnFalseOnNotRunning=True): if not quiet: print "no old buildslave process found to stop" if not quiet: print "now restarting buildslave process.." start(config)
def restart(config): quiet = config['quiet'] if not isBuildslaveDir(config['basedir']): print "not a buildslave directory" sys.exit(1) from buildslave.scripts.startup import start if not stop(config, wait=True, returnFalseOnNotRunning=True): if not quiet: print "no old buildslave process found to stop" if not quiet: print "now restarting buildslave process.." start(config)
def restart(config): quiet = config['quiet'] if not base.isBuildslaveDir(config['basedir']): sys.exit(1) from buildslave.scripts.startup import start try: stopSlave(config['basedir'], quiet) except SlaveNotRunning: if not quiet: print "no old buildslave process found to stop" if not quiet: print "now restarting buildslave process.." start(config)
config = Options() try: config.parseOptions() except usage.error, e: print "%s: %s" % (sys.argv[0], e) print c = getattr(config, 'subOptions', config) print str(c) sys.exit(1) command = config.subCommand so = config.subOptions if command == "create-slave": createSlave(so) elif command == "upgrade-slave": upgradeSlave(so) elif command == "start": if not isBuildslaveDir(so['basedir']): print "not a buildslave directory" sys.exit(1) from buildslave.scripts.startup import start start(so) elif command == "stop": stop(so, wait=True) elif command == "restart": restart(so) sys.exit(0)
def run(): config = Options() try: config.parseOptions() except usage.error, e: print "%s: %s" % (sys.argv[0], e) print c = getattr(config, 'subOptions', config) print str(c) sys.exit(1) command = config.subCommand so = config.subOptions if command == "create-slave": createSlave(so) elif command == "upgrade-slave": upgradeSlave(so) elif command == "start": if not isBuildslaveDir(so['basedir']): print "not a buildslave directory" sys.exit(1) from buildslave.scripts.startup import start start(so) elif command == "stop": stop(so, wait=True) elif command == "restart": restart(so) sys.exit(0)