static String getApparmorProfilePath() {
    final Path configDirPath = Path.of("/etc/apparmor.d");
    if (!Files.exists(configDirPath) || !Files.isDirectory(configDirPath)) {
      LOG.warn("Can't generate the apparmor profile for CEF: /etc/apparmor.d doesn't exists");
      return null;
    }

    String appName = getApplicationName();
    for (int i = 0; i <= 1000; ++i) {
      String fileName = appName + (i == 0 ? "" : "-" + i);
      Path configPath = configDirPath.resolve(fileName);
      if (!Files.exists(configPath)) {
        return configPath.toString();
      }
    }

    LOG.warn("Can't generate the apparmor profile for CEF: failed to find the filename");
    return null;
  }
static String getApparmorProfilePath()