Correction script d'install
This commit is contained in:
parent
1a401be3df
commit
1ba5a9873e
@ -18,18 +18,22 @@ action :
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action = $argv[1];
|
$action = $argv[1];
|
||||||
$mode = strtoupper($argv[2]);
|
|
||||||
$hostname = exec('echo $(hostname)');
|
$hostname = exec('echo $(hostname)');
|
||||||
$wwwroot = realpath(dirname(__FILE__).'/../../');
|
$wwwroot = realpath(dirname(__FILE__).'/../../');
|
||||||
|
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
case 'configure':
|
case 'configure':
|
||||||
|
if (!isRoot()) {
|
||||||
|
echo "Vous devez être ROOT pour utiliser ce script.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
writeConfig();
|
writeConfig();
|
||||||
changePermission();
|
changePermission();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'install':
|
case 'install':
|
||||||
|
/*
|
||||||
if (!isRoot()) {
|
if (!isRoot()) {
|
||||||
echo "Vous devez être ROOT pour utiliser ce script.\n";
|
echo "Vous devez être ROOT pour utiliser ce script.\n";
|
||||||
exit;
|
exit;
|
||||||
@ -37,7 +41,8 @@ switch ($action)
|
|||||||
writeConfig();
|
writeConfig();
|
||||||
changePermission();
|
changePermission();
|
||||||
changePrimarySymlink();
|
changePrimarySymlink();
|
||||||
passthru('php ../batch/genwsdl.php all');
|
passthru('php ../batch/genwsdl.php --all --host wse.scores-decisions.com:8081');
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,12 +61,13 @@ function isRoot()
|
|||||||
|
|
||||||
function changePermission()
|
function changePermission()
|
||||||
{
|
{
|
||||||
passthru('chown -R www-data: '.realpath(dirname(__FILE__).'/../'));
|
passthru('chown -vR www-data: '.realpath(dirname(__FILE__).'/../'));
|
||||||
passthru('chmod +x '.realpath(dirname(__FILE__).'/../batch/*.php'));
|
passthru('chmod -vR +x '.realpath(dirname(__FILE__).'/../batch/').'/*.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function changePrimarySymlink()
|
function changePrimarySymlink()
|
||||||
{
|
{
|
||||||
|
global $wwwroot;
|
||||||
passthru('rm '.$wwwroot.'/webservice');
|
passthru('rm '.$wwwroot.'/webservice');
|
||||||
passthru('ln -s '.realpath(dirname(__FILE__).'/../').' '.$wwwroot.'/webservice');
|
passthru('ln -s '.realpath(dirname(__FILE__).'/../').' '.$wwwroot.'/webservice');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user