Copy configuration every time we made an update

This commit is contained in:
Michael RICOIS 2015-06-12 09:43:41 +00:00
parent 1e5b034c81
commit 5d091a42cd

View File

@ -72,14 +72,9 @@ if ($opts->install)
$appconfigDir = APPLICATION_PATH.'/configs';
$profil = $opts->install;
if ( ! file_exists($appconfigDir.'/application.ini') ) {
$result = copy($configDir.'/'.$profil.'/application.ini', $appconfigDir.'/application.ini');
if ($result !== true) {
echo date('Y-m-d H:i:s')." - Impossible de copier la configuration.\n";
exit(1);
}
} else {
echo date('Y-m-d H:i:s')." - Le profil de configuration existe déja.\n";
$result = copy($configDir.'/'.$profil.'/application.ini', $appconfigDir.'/application.ini');
if ($result !== true) {
echo date('Y-m-d H:i:s')." - Impossible de copier la configuration.\n";
exit(1);
}