import include from dockerfly.settings import dockerfly_version from dockerfly.settings import RUN_ROOT, LOG_ROOT, DB_ROOT if not os.path.exists(RUN_ROOT): os.makedirs(RUN_ROOT) if not os.path.exists(LOG_ROOT): os.makedirs(LOG_ROOT) if not os.path.exists(DB_ROOT): os.makedirs(DB_ROOT) from dockerfly.logger import getLogger, getFh from dockerfly.http.server import run_server pid_file = os.path.join(RUN_ROOT, 'dockerflyd.pid.lock') logger = getLogger() def dockerflyd_setup(): if os.path.exists(pid_file): logger.error("{} has already existed".format(pid_file)) def dockerflyd_cleanup(): if os.path.exists(pid_file): os.remove(pid_file) def dockerflyd_reload_config(): pass
import include from dockerfly.settings import dockerfly_version from dockerfly.settings import RUN_ROOT, LOG_ROOT, DB_ROOT if not os.path.exists(RUN_ROOT): os.makedirs(RUN_ROOT) if not os.path.exists(LOG_ROOT): os.makedirs(LOG_ROOT) if not os.path.exists(DB_ROOT): os.makedirs(DB_ROOT) from dockerfly.logger import getLogger, getFh from dockerfly.http.server import run_server pid_file = os.path.join(RUN_ROOT, 'dockerflyd.pid.lock') logger = getLogger() def dockerflyd_setup(): if os.path.exists(pid_file): logger.error("{} has already existed".format(pid_file)) def dockerflyd_cleanup(): if os.path.exists(pid_file): os.remove(pid_file) def dockerflyd_reload_config(): pass def terminate(): os.kill(os.getpid(), signal.SIGTERM)