Major changes in setup scripts.
This commit is contained in:
parent
ffc09993bb
commit
4f5ba7085f
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.4 $
|
Version : $Revision: 1.5 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/conf.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/conf.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -62,18 +62,19 @@ $config = array(
|
||||||
'bufferDir' => dirname(getcwd()).'/stor/buffer',
|
'bufferDir' => dirname(getcwd()).'/stor/buffer',
|
||||||
'transDir' => dirname(getcwd()).'/trans',
|
'transDir' => dirname(getcwd()).'/trans',
|
||||||
'accessDir' => dirname(getcwd()).'/access',
|
'accessDir' => dirname(getcwd()).'/access',
|
||||||
|
'isArchive' => TRUE,
|
||||||
|
|
||||||
/* ==================================================== URL configuration */
|
/* ==================================================== URL configuration */
|
||||||
// on central archive side: storage=archive !
|
// on central archive side: archive is the storage !
|
||||||
'storageUrlPath' => '/livesupportArchiveServer',
|
'storageUrlPath' => '/livesupportArchiveServer',
|
||||||
'storageXMLRPC' => 'xmlrpc/xrArchive.php',
|
'storageXMLRPC' => 'xmlrpc/xrArchive.php',
|
||||||
'storageUrlHost' => 'localhost',
|
'storageUrlHost' => 'localhost',
|
||||||
'storageUrlPort' => 80,
|
'storageUrlPort' => 80,
|
||||||
// only for returning right URLs:
|
// have to be another remote archive:
|
||||||
'archiveUrlPath' => '/livesupportArchiveServer',
|
#'archiveUrlPath' => '/livesupportArchiveServer',
|
||||||
'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
|
#'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
|
||||||
'archiveUrlHost' => 'localhost',
|
#'archiveUrlHost' => 'localhost',
|
||||||
'archiveUrlPort' => 80,
|
#'archiveUrlPort' => 80,
|
||||||
|
|
||||||
/* ==================================== aplication-specific configuration */
|
/* ==================================== aplication-specific configuration */
|
||||||
'objtypes' => array(
|
'objtypes' => array(
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.3 $
|
Version : $Revision: 1.4 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/install.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/install.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -41,6 +41,11 @@ function errCallback($err)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!function_exists('domxml_open_file')){
|
||||||
|
trigger_error("DOMXML PHP extension required and not found.", E_USER_ERROR);
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
$dbc = DB::connect($config['dsn'], TRUE);
|
$dbc = DB::connect($config['dsn'], TRUE);
|
||||||
if(PEAR::isError($dbc)){
|
if(PEAR::isError($dbc)){
|
||||||
|
@ -52,18 +57,22 @@ if(PEAR::isError($dbc)){
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
$gb = &new GreenBox(&$dbc, $config);
|
$gb = &new Archive(&$dbc, $config);
|
||||||
|
|
||||||
echo "\n# archiveServer: Install ...\n";
|
echo "# archiveServer step 2:\n# trying uninstall ...\n";
|
||||||
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
$gb->uninstall();
|
$gb->uninstall();
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
|
||||||
$gb->install();
|
echo "# Install ...\n";
|
||||||
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
|
PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
||||||
|
$r = $gb->install();
|
||||||
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
||||||
|
|
||||||
echo "# Testing ...\n";
|
echo "# Testing ...\n";
|
||||||
$gb->test();
|
$gb->test();
|
||||||
$log = $gb->test_log;
|
$log = $gb->test_log;
|
||||||
echo " TESTS:\n{$log}";
|
if($log) echo "# testlog:\n{$log}";
|
||||||
|
|
||||||
#echo "# Reinstall + testdata insert ...\n";
|
#echo "# Reinstall + testdata insert ...\n";
|
||||||
#$gb->reinstall();
|
#$gb->reinstall();
|
||||||
|
@ -77,10 +86,11 @@ echo " TESTS:\n{$log}";
|
||||||
echo "# Delete test data ...\n";
|
echo "# Delete test data ...\n";
|
||||||
$gb->deleteData();
|
$gb->deleteData();
|
||||||
|
|
||||||
if(!($fp = @fopen($config['storageDir']."/_writeTest", 'w')))
|
if(!($fp = @fopen($config['storageDir']."/_writeTest", 'w'))){
|
||||||
echo "\n<b>make {$config['storageDir']} dir webdaemon-writeable</b>".
|
echo "\n<b>make {$config['storageDir']} dir webdaemon-writeable</b>".
|
||||||
"\nand run install again\n\n";
|
"\nand run install again\n\n";
|
||||||
else{
|
exit(1);
|
||||||
|
}else{
|
||||||
fclose($fp); unlink($config['storageDir']."/_writeTest");
|
fclose($fp); unlink($config['storageDir']."/_writeTest");
|
||||||
echo "#archiveServer install: OK\n\n";
|
echo "#archiveServer install: OK\n\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/uninstall.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/uninstall.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -52,12 +52,14 @@ if(PEAR::isError($dbc)){
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "#ArchiveServer uninstall:\n";
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
$gb = &new GreenBox(&$dbc, $config);
|
$gb = &new Archive(&$dbc, $config);
|
||||||
|
|
||||||
# $dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
|
||||||
echo "# Trying to uninstall archiveServer ...\n";
|
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
$gb->uninstall();
|
$gb->uninstall();
|
||||||
|
echo "#ArchiveServer uninstall: OK\n";
|
||||||
|
|
||||||
$dbc->disconnect();
|
$dbc->disconnect();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue