def test_daemon_configuration(daemon_name):
    '''
    Checking if the daemon configuration file and folder exists
    :param daemon_name:
    :return: True if exists
    '''
    print("Testing if the daemon configuration folder exists")
    is_daemon_dir_exists = check_file_in_directory(daemon_name, "/etc/")
    if not is_daemon_dir_exists:
        print_error("Could not locate " + daemon_name + " directory.[under \'/etc/\']")
        return False
    print_ok("Located /etc/" + daemon_name + " directory.")
    print("Checking omsagent configuration under the name of: \'security-config-omsagent.conf\'")
    config_exists = check_file_in_directory("security-config-omsagent.conf",
                                            rsyslog_daemon_forwarding_configuration_dir_path if daemon_name == rsyslog_daemon_name else syslog_ng_daemon_forwarding_configuration_dir_path)
    if not config_exists:
        print_error("security-config-omsagent.conf does not exists in " + daemon_name + " directory")
        return False
    else:
        print_ok("Located security-config-omsagent.conf")
        return True

    Checking if the daemon configuration file and folder exists
    :param daemon_name:
    :return: True if exists
    
DataConnectors/CEF/cef_troubleshoot.py