$yamlParser = new \Symfony\Component\Yaml\Parser();
            $groups = $yamlParser->parse(file_get_contents(\BackBee\Standard\Application::getConfigurationDir() . 'groups.yml'));
            foreach ($groups as $groupName => $rights) {
                $group = new \BackBee\Security\Group();
                $group->setName($groupName);
                if (array_key_exists('description', $rights)) {
                    $group->setDescription($rights['description']);
                    unset($rights['description']);
                }
                $group->setSite($site);
                $em->persist($group);
                $em->flush($group);
                setSiteGroupRights($site, $group, $rights);
            }
        }
        cleanupEnvironment($application->getCacheDir());
        // create a tag file to know if the site is installed or not
        file_put_contents('INSTALL_OK', 'Successfully installed BackBee CMS');
        break;
    case 1:
    default:
        $backbeeRequirements = new BackBeeRequirements();
        $requirements = $backbeeRequirements->getRequirements();
}
function cleanupEnvironment($cacheDir = null, $logDir = null)
{
    $cacheDir = $cacheDir ?: realpath(__DIR__ . '/../cache');
    $logDir = $logDir ?: realpath(__DIR__ . '/../log');
    exec("rm -rf {$cacheDir}/* {$logDir}/*");
}
/**