From 4f3c8085703b6ab526d92d1197d095fb62bc21a4 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 27 Jan 2016 16:41:22 +0000 Subject: [PATCH] Update configuration --- scripts/build/configure.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/build/configure.php b/scripts/build/configure.php index 50e03e4c..a3c579fc 100644 --- a/scripts/build/configure.php +++ b/scripts/build/configure.php @@ -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"; }