deploy.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:picoCTF 作者: picoCTF 项目源码 文件源码
def install_user_service(service_file, socket_file):
    """
    Installs the service file and socket file into the xinetd
    service directory, sets the service to start on boot, and
    starts the service now.

    Args:
        service_file: The path to the systemd service file to install
        socket_file: The path to the systemd socket file to install
    """

    if service_file is None:
       return
    service_name = os.path.basename(service_file)

    logger.debug("...Installing user service '%s'.", service_name)

    # copy service file
    service_path = os.path.join(XINETD_SERVICE_PATH, service_name)
    shutil.copy2(service_file, service_path)

    execute(["service", "xinetd", "restart"], timeout=60)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号