Ejemplo n.º 1
0
def get_shell():

    global filetool

    filetool = CommonTools.check_file()

    # apache_tool.get_log_directory_from_env()

    if (filetool.checkfile_shell(argv[2]) is False):
        find_vhost_from_url(argv[2])
    else:
        find_vhost_from_log_name(argv[2])

    find_logformat()
    make_log_choice()

    # try_parse()

    # check_first_and_last_line_apache()
    # check_param()

    try:
        apache_shell()
    except KeyboardInterrupt:
        exit('Keyboard Interrupt')
Ejemplo n.º 2
0
def get_shell():

    global filetool

    filetool = CommonTools.check_file()

    # apache_tool.get_log_directory_from_env()

    if (filetool.checkfile_shell(argv[2]) is False):
        find_vhost_from_url(argv[2])
    else:
        find_vhost_from_log_name(argv[2])

    find_logformat()
    make_log_choice()

    # try_parse()

    # check_first_and_last_line_apache()
    # check_param()

    try:
        apache_shell()
    except KeyboardInterrupt:
        exit('Keyboard Interrupt')
Ejemplo n.º 3
0
def get_shell():

    global filetool

    filetool = CommonTools.check_file()
    if filetool.checkfile_shell(sys.argv[2]) is False:
        Message = "Le module Postfix prend un fichier en paramètre"
        exit("\n     %s" % Colors.change_color(Message, "FAIL"))

    check_first_and_last_line_postfix()
    check_param()

    try:
        postfix_shell()
    except KeyboardInterrupt:
        Message = "\n     KeyboardInterrupt"
        exit(Colors.change_color(Message, "FAIL"))
Ejemplo n.º 4
0
def get_shell():

    global filetool

    filetool = CommonTools.check_file()
    if (filetool.checkfile_shell(sys.argv[2]) is False):
        Message = "Le module Postfix prend un fichier en paramètre"
        exit('\n     %s' % Colors.change_color(Message, 'FAIL'))

    check_first_and_last_line_postfix()
    check_param()

    try:
        postfix_shell()
    except KeyboardInterrupt:
        Message = '\n     KeyboardInterrupt'
        exit(Colors.change_color(Message, 'FAIL'))