diff --git a/dmsctl.sh b/dmsctl.sh index fbe83db..70ef294 100755 --- a/dmsctl.sh +++ b/dmsctl.sh @@ -16,13 +16,30 @@ INSTALL_PATH=`pwd` JAVABIN=/usr/bin/java ZEND_DIR=/usr/local/zend +# exits if the UID is not 0 [root] +check_root_privileges() +{ + ID="id -u" + MYUID=`$ID 2> /dev/null` + if [ ! -z "$MYUID" ]; then + if [ $MYUID != 0 ]; then + echo "You need root privileges to run this script!"; + exit 1 + fi + else + echo "Could not detect UID"; + exit 1 + fi +} + + if [ -f /etc/zce.rc ];then . /etc/zce.rc else echo "/etc/zce.rc doesn't exist!" exit 1; fi - +check_root_privileges # OpenOffice SOFFICEFILE=soffice diff --git a/setup/migrate/steps/migrateInstallation.php b/setup/migrate/steps/migrateInstallation.php index 72ed725..e97c313 100644 --- a/setup/migrate/steps/migrateInstallation.php +++ b/setup/migrate/steps/migrateInstallation.php @@ -160,7 +160,7 @@ class migrateInstallation extends step public function checkVersion() { if($this->foundVersion < $this->supportedVersion) { $this->versionError = true; - $this->error[] = "KT installation needs to be 3.6.1 or higher"; + $this->error[] = "KnowledgeTree installation needs to be 3.6.1 or higher"; return false; } @@ -173,7 +173,7 @@ class migrateInstallation extends step $foundVersion = file_get_contents($verFile); return $foundVersion; } else { - $this->error[] = "KT installation version not found"; + $this->error[] = "KnowledgeTree installation version not found"; } return false; @@ -214,10 +214,10 @@ class migrateInstallation extends step return true; } - $this->error[] = "KT installation configuration file empty"; + $this->error[] = "KnowledgeTree installation configuration file empty"; } } else { - $this->error[] = "KT installation configuration file not found"; + $this->error[] = "KnowledgeTree installation configuration file not found"; } } else { $this->error[] = "Please Enter a Location"; diff --git a/setup/upgrade/step.php b/setup/upgrade/step.php index 691224b..5a36d16 100644 --- a/setup/upgrade/step.php +++ b/setup/upgrade/step.php @@ -467,7 +467,7 @@ class Step $foundVersion = file_get_contents($verFile); return $foundVersion; } else { - $this->error[] = "KT installation version not found"; + $this->error[] = "KnowledgeTree installation version not found"; } return false; diff --git a/setup/upgrade/steps/upgradeDatabase.php b/setup/upgrade/steps/upgradeDatabase.php index 0152148..4ebbbfe 100644 --- a/setup/upgrade/steps/upgradeDatabase.php +++ b/setup/upgrade/steps/upgradeDatabase.php @@ -202,7 +202,7 @@ class upgradeDatabase extends Step $foundVersion = file_get_contents($verFile); return $foundVersion; } else { - $this->error[] = "KT installation version not found"; + $this->error[] = "KnowledgeTree installation version not found"; } return false; diff --git a/setup/upgrade/upgradeWizard.php b/setup/upgrade/upgradeWizard.php index f41a73e..1e4c873 100644 --- a/setup/upgrade/upgradeWizard.php +++ b/setup/upgrade/upgradeWizard.php @@ -146,18 +146,6 @@ class UpgradeWizard { } /** - * Create upgrade file - * - * @author KnowledgeTree Team - * @access private - * @param none - * @return void - */ - private function createUpgradeFile() { - touch(SYSTEM_DIR.'var'.DS.'bin'.DS."upgrade.lock"); - } - - /** * Remove upgrade file * * @author KnowledgeTree Team @@ -222,8 +210,6 @@ class UpgradeWizard { */ public function dispatch() { $this->load(); - // is this necessary? - $this->createUpgradeFile(); $response = $this->systemChecks(); if($this->util->installationSpecified()) { // Check if the migrator needs to be accessed $this->util->redirect('../wizard/index.php?step_name=install_type'); diff --git a/setup/upgrade/upgrader.php b/setup/upgrade/upgrader.php index ccabb71..7ceb3f1 100644 --- a/setup/upgrade/upgrader.php +++ b/setup/upgrade/upgrader.php @@ -400,20 +400,6 @@ class Upgrader { for ($i=1; $i< count($steps)+1; $i++) { $this->_upgradeHelper($steps[$i]); } - - $this->_completeUpgrade(); - } - - /** - * Complete upgrade cleanup process - * - * @author KnowledgeTree Team - * @param none - * @access private - * @return void - */ - private function _completeUpgrade() { - touch("upgrade"); } /** diff --git a/setup/wizard/installUtil.php b/setup/wizard/installUtil.php index 9a4f87a..400bd7f 100644 --- a/setup/wizard/installUtil.php +++ b/setup/wizard/installUtil.php @@ -878,7 +878,7 @@ class InstallUtil { return $type; } - return false; + return "community"; } /** diff --git a/setup/wizard/lib/services/windowsLucene.php b/setup/wizard/lib/services/windowsLucene.php index 7d1fdaa..a370651 100644 --- a/setup/wizard/lib/services/windowsLucene.php +++ b/setup/wizard/lib/services/windowsLucene.php @@ -424,7 +424,7 @@ class windowsLucene extends windowsService { $luceneExe = $this->getLuceneExe(); $luceneSource = $this->getLuceneSource(); $luceneDir = $this->getluceneDir(); - $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" -description "."\"".$this->description."\""." \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto"; + $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto"; if(DEBUG) { echo "$cmd
"; return false;