#!/usr/bin/python
# -*- coding: utf8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
# pylint: disable=C0103

""" Perform final installation to prepare system """

from shutil import copy
import os

PROJECT = "timevortex"
PLUGIN = "timeserieslogger"


if __name__ == "__main__":
    
    # Create /opt/timevortex folder if not exist
    # folder_path = os.path.join("/opt", PROJECT)
    # if not os.path.exists(folder_path):
    #     os.makedirs(folder_path)
    
    # Create /opt/timevortex/data folder if not exist
    folder_data_path = os.path.join(folder_path, "data")
    if not os.path.exists(folder_data_path):
        os.makedirs(folder_data_path)

    # Create /var/log/timevortex folder and copy log configuration in /opt/timevortex
    log_folder_path = os.path.join("/var", "log", PROJECT)
    if not os.path.exists(log_folder_path):
        os.makedirs(log_folder_path)

    # Copy log configuration in /opt/timevortex
    # log_conf_path = os.path.join("/tmp", "%s-%s.conf" % (PROJECT, PLUGIN))
    # copy(log_conf_path, folder_path)