Update configuration

This commit is contained in:
Michael RICOIS 2016-01-27 16:41:22 +00:00
parent 8d9fab7245
commit 4f3c808570

View File

@ -81,19 +81,21 @@ if ($opts->install)
$path.'/wsdl',
);
foreach ($dirToCreate as $dir) {
if ( file_exists($dir) ) {
passthru("rm -rfv ".$dir);
if (in_array($dir, array('sessions', 'wsdl')) ) {
passthru('rm -rf '.$dir);
}
if ( ! file_exists($dir) ) {
mkdir($dir, 0777, true);
// --- Modification des permissions
passthru('chown -Rv www-data: '.$dir);
}
mkdir($dir, 0777, true);
// --- Modification des permissions
passthru('chown -Rv www-data: '.$dir);
}
// --- Release
$projectPath = str_replace('/shared', '', $c->profil->path->shared);
$releasePath = realpath(str_replace('/application', '', APPLICATION_PATH));
passthru("rm -v ".$projectPath."/current");
passthru("ln -vs ".$releasePath." ".$projectPath."/current");
passthru("ln -sv ".$releasePath." ".$projectPath."/current");
echo date('Y-m-d H:i:s')." - Fin de la configuration.\n";
}