Пример #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')
Пример #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')
Пример #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"))
Пример #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'))