parent
300a90ab83
commit
798b48c6b3
|
@ -22,7 +22,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: tomas $
|
# Author : $Author: tomas $
|
||||||
# Version : $Revision: 1.2 $
|
# Version : $Revision: 1.3 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/bin/setupDirs.sh,v $
|
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/bin/setupDirs.sh,v $
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
WWW_ROOT=`cd var/install; php -q getWwwRoot.php` || exit $?
|
WWW_ROOT=`cd var/install; php -q getWwwRoot.php` || exit $?
|
||||||
echo "# storageServer root URL: $WWW_ROOT"
|
echo "#StorageServer step 1:"
|
||||||
|
echo "# root URL: $WWW_ROOT"
|
||||||
|
|
||||||
HTTP_GROUP=`bin/getUrl.sh $WWW_ROOT/install/getGname.php` || \
|
HTTP_GROUP=`bin/getUrl.sh $WWW_ROOT/install/getGname.php` || \
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,13 +23,15 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.8 $
|
Version : $Revision: 1.9 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/install.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/install.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
require_once '../conf.php';
|
require_once '../conf.php';
|
||||||
require_once 'DB.php';
|
require_once 'DB.php';
|
||||||
require_once '../GreenBox.php';
|
require_once '../GreenBox.php';
|
||||||
|
require_once "../Transport.php";
|
||||||
|
require_once "../Prefs.php";
|
||||||
|
|
||||||
function errCallback($err)
|
function errCallback($err)
|
||||||
{
|
{
|
||||||
|
@ -57,19 +59,26 @@ if(PEAR::isError($dbc)){
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
$gb = &new GreenBox(&$dbc, $config);
|
$gb =& new GreenBox(&$dbc, $config);
|
||||||
|
$tr =& new Transport(&$dbc, $config);
|
||||||
|
$pr =& new Prefs(&$gb);
|
||||||
|
|
||||||
echo "\n# storageServer: Install ...\n";
|
echo "#StorageServer step 2:\n# trying uninstall ...\n";
|
||||||
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
|
$pr->uninstall();
|
||||||
|
$tr->uninstall();
|
||||||
$gb->uninstall();
|
$gb->uninstall();
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
|
||||||
|
echo "# Install ...\n";
|
||||||
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
|
PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
||||||
$r = $gb->install();
|
$r = $gb->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
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();
|
||||||
|
@ -80,7 +89,7 @@ echo " TESTS:\n{$log}";
|
||||||
#echo "# TREE DUMP:\n";
|
#echo "# TREE DUMP:\n";
|
||||||
#echo $gb->dumpTree();
|
#echo $gb->dumpTree();
|
||||||
|
|
||||||
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'))){
|
||||||
|
@ -89,22 +98,20 @@ if(!($fp = @fopen($config['storageDir']."/_writeTest", 'w'))){
|
||||||
exit(1);
|
exit(1);
|
||||||
}else{
|
}else{
|
||||||
fclose($fp); unlink($config['storageDir']."/_writeTest");
|
fclose($fp); unlink($config['storageDir']."/_writeTest");
|
||||||
echo "#storageServer install: OK\n\n";
|
echo "#storageServer main: OK\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "# Install Transport submodule\n";
|
echo "# Install Transport submodule ...";
|
||||||
require_once "../Transport.php";
|
|
||||||
$tr =& new Transport(&$dbc, $config);
|
|
||||||
$r = $tr->install();
|
$r = $tr->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
echo "# Install Prefs submodule\n";
|
echo "# Install Prefs submodule ...";
|
||||||
require_once "../Prefs.php";
|
|
||||||
$pr =& new Prefs(&$gb);
|
|
||||||
$r = $pr->install();
|
$r = $pr->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
|
echo "#storageServer submodules: OK\n";
|
||||||
|
echo "\n";
|
||||||
$dbc->disconnect();
|
$dbc->disconnect();
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -23,13 +23,15 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.6 $
|
Version : $Revision: 1.7 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/uninstall.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/uninstall.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
require_once '../conf.php';
|
require_once '../conf.php';
|
||||||
require_once 'DB.php';
|
require_once 'DB.php';
|
||||||
require_once '../GreenBox.php';
|
require_once '../GreenBox.php';
|
||||||
|
require_once "../Transport.php";
|
||||||
|
require_once "../Prefs.php";
|
||||||
|
|
||||||
function errCallback($err)
|
function errCallback($err)
|
||||||
{
|
{
|
||||||
|
@ -52,26 +54,26 @@ if(PEAR::isError($dbc)){
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "#StorageServer uninstall:\n";
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
$gb = &new GreenBox(&$dbc, $config);
|
$gb = &new GreenBox(&$dbc, $config);
|
||||||
# $dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
$tr =& new Transport(&$dbc, $config);
|
||||||
|
|
||||||
echo "# Uninstall Prefs submodule\n";
|
|
||||||
require_once "../Prefs.php";
|
|
||||||
$pr =& new Prefs(&$gb);
|
$pr =& new Prefs(&$gb);
|
||||||
|
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
|
|
||||||
|
echo "# Uninstall Prefs submodule";
|
||||||
$r = $pr->uninstall();
|
$r = $pr->uninstall();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
echo "# Uninstall Transport submodule ...\n";
|
echo "# Uninstall Transport submodule ...";
|
||||||
require_once "../Transport.php";
|
|
||||||
$tr =& new Transport(&$dbc, $config);
|
|
||||||
$r = $tr->uninstall();
|
$r = $tr->uninstall();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
echo "# StorageServer uninstall ...\n";
|
echo "# Uninstall StorageServer ...\n";
|
||||||
$gb->uninstall();
|
$gb->uninstall();
|
||||||
|
echo "#StorageServer uninstall: OK\n";
|
||||||
|
|
||||||
$dbc->disconnect();
|
$dbc->disconnect();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue