def _stop_unity8(): status = process_helpers._get_unity_status() if "start/" in status: try: logger.debug("Stopping unity8") subprocess.check_call(['initctl', 'stop', 'unity8']) except subprocess.CalledProcessError as e: e.args += ("Unable to stop unity8",) raise else: logger.debug("No need to stop unity.")
def _start_unity8(): status = process_helpers._get_unity_status() if "stop/" in status: try: logger.debug("Starting unity8") subprocess.check_call(['initctl', 'start', 'unity8']) except subprocess.CalledProcessError as e: e.args += ("Unable to start unity8",) raise else: raise RuntimeError( "Unable to start unity8: server is currently running." )