Major changes in setup scripts.

This commit is contained in:
tomas 2005-01-19 05:06:14 +00:00
parent ffc09993bb
commit 4f5ba7085f
3 changed files with 34 additions and 21 deletions

View File

@ -23,7 +23,7 @@
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 $
------------------------------------------------------------------------------*/
@ -62,18 +62,19 @@ $config = array(
'bufferDir' => dirname(getcwd()).'/stor/buffer',
'transDir' => dirname(getcwd()).'/trans',
'accessDir' => dirname(getcwd()).'/access',
'isArchive' => TRUE,
/* ==================================================== URL configuration */
// on central archive side: storage=archive !
// on central archive side: archive is the storage !
'storageUrlPath' => '/livesupportArchiveServer',
'storageXMLRPC' => 'xmlrpc/xrArchive.php',
'storageUrlHost' => 'localhost',
'storageUrlPort' => 80,
// only for returning right URLs:
'archiveUrlPath' => '/livesupportArchiveServer',
'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
'archiveUrlHost' => 'localhost',
'archiveUrlPort' => 80,
// have to be another remote archive:
#'archiveUrlPath' => '/livesupportArchiveServer',
#'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
#'archiveUrlHost' => 'localhost',
#'archiveUrlPort' => 80,
/* ==================================== aplication-specific configuration */
'objtypes' => array(

View File

@ -23,7 +23,7 @@
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 $
------------------------------------------------------------------------------*/
@ -41,6 +41,11 @@ function errCallback($err)
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");
$dbc = DB::connect($config['dsn'], TRUE);
if(PEAR::isError($dbc)){
@ -52,18 +57,22 @@ if(PEAR::isError($dbc)){
}
$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);
$gb->uninstall();
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
$gb->install();
echo "# Testing ...\n";
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";
$gb->test();
$log = $gb->test_log;
echo " TESTS:\n{$log}";
if($log) echo "# testlog:\n{$log}";
#echo "# Reinstall + testdata insert ...\n";
#$gb->reinstall();
@ -74,13 +83,14 @@ echo " TESTS:\n{$log}";
#echo "# TREE DUMP:\n";
#echo $gb->dumpTree();
echo "# Delete test data ...\n";
echo "# Delete test data ...\n";
$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>".
"\nand run install again\n\n";
else{
exit(1);
}else{
fclose($fp); unlink($config['storageDir']."/_writeTest");
echo "#archiveServer install: OK\n\n";
}

View File

@ -23,7 +23,7 @@
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 $
------------------------------------------------------------------------------*/
@ -52,12 +52,14 @@ if(PEAR::isError($dbc)){
exit(1);
}
echo "#ArchiveServer uninstall:\n";
$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();
echo "#ArchiveServer uninstall: OK\n";
$dbc->disconnect();
?>