diff --git a/dmsctl.sh b/dmsctl.sh
index 30f402e..fbe83db 100755
--- a/dmsctl.sh
+++ b/dmsctl.sh
@@ -2,7 +2,7 @@
# chkconfig: 2345 55 25
# description: KnowledgeTree Services
#
-# processname: ktdms
+# processname: ktdms
cd $(dirname $0)
@@ -29,7 +29,7 @@ SOFFICEFILE=soffice
SOFFICE_PIDFILE=$INSTALL_PATH/var/log/soffice.bin.pid
SOFFICE_PID=""
SOFFICE_PORT="8100"
-SOFFICEBIN=/usr/bin/soffice
+SOFFICEBIN=/usr/share/ktdms-office/ktdms-office/openoffice/program/soffice
SOFFICE="$SOFFICEBIN -nofirststartwizard -nologo -headless -accept=socket,host=127.0.0.1,port=$SOFFICE_PORT;urp;StarOffice.ServiceManager"
SOFFICE_STATUS=""
@@ -38,7 +38,6 @@ LUCENE_PIDFILE=$INSTALL_PATH/var/log/lucene.pid
LUCENE_PID=""
LUCENE="$JAVABIN -Xms512M -Xmx512M -jar ktlucene.jar"
LUCENE_STATUS=""
-:q
# Scheduler
SCHEDULER_PATH="$INSTALL_PATH/bin/"
@@ -71,7 +70,7 @@ get_pid() {
get_soffice_pid() {
get_pid $SOFFICE_PIDFILE
if [ ! $PID ]; then
- return
+ return
fi
if [ $PID -gt 0 ]; then
SOFFICE_PID=$PID
@@ -81,7 +80,7 @@ get_soffice_pid() {
get_lucene_pid() {
get_pid $LUCENE_PIDFILE
if [ ! $PID ]; then
- return
+ return
fi
if [ $PID -gt 0 ]; then
LUCENE_PID=$PID
@@ -91,7 +90,7 @@ get_lucene_pid() {
get_scheduler_pid() {
get_pid $SCHEDULER_PIDFILE
if [ ! $PID ]; then
- return
+ return
fi
if [ $PID -gt 0 ]; then
SCHEDULER_PID=$PID
@@ -101,7 +100,7 @@ get_scheduler_pid() {
get_mysql_pid() {
get_pid $MYSQL_PIDFILE
if [ ! $PID ]; then
- return
+ return
fi
if [ $PID -gt 0 ]; then
MYSQL_PID=$PID
@@ -183,7 +182,7 @@ start_soffice() {
echo "$0 $ARG: openoffice could not be started"
ERROR=3
fi
- else
+ else
echo "$0 $ARG: path to openoffice binary ($SOFFICEBIN) could not be found"
ERROR=3
fi
@@ -388,7 +387,7 @@ if [ ! -z ${2} ]; then
[ "${2}" != "mysql" ] && [ "${2}" != "apache" ] && [ "${2}" != "agent" ] && [ "${2}" != "scheduler" ] && [ "${2}" != "soffice" ] && [ "${2}" != "lucene" ] && noserver $2
SERVER=$2
fi
-
+
if [ "x$3" != "x" ]; then
MYSQL_PASSWORD=$3
diff --git a/resources/css/kt-framing.css b/resources/css/kt-framing.css
index 47544f0..f326b0d 100644
--- a/resources/css/kt-framing.css
+++ b/resources/css/kt-framing.css
@@ -25,6 +25,7 @@ body
{
/*margin-top: 15px;*/
margin-left: 10px;
+ margin-right: 25px;
}
.copyright {
@@ -1289,7 +1290,7 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes
width: 47%;
margin-top: 0;
margin-left: 0;
- padding-right: 2em;
+ padding-right: 3em;
float: left;
padding-bottom: 2em;
height: 100%;
diff --git a/setup/migrate/steps/migrateComplete.php b/setup/migrate/steps/migrateComplete.php
index 8f38df0..8e76177 100644
--- a/setup/migrate/steps/migrateComplete.php
+++ b/setup/migrate/steps/migrateComplete.php
@@ -85,7 +85,6 @@ class migrateComplete extends Step {
return 'landing';
}
if($this->next()) {
- $this->checkZendMysql();
if($this->checkZendMysql()) {
return 'binstall';
} else {
@@ -133,17 +132,8 @@ class migrateComplete extends Step {
if($response['out']) {
$state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key
}
- if($state == "STARTED") {
+ if($state == "STARTED")
$running = true;
- } else {
- $installation = $this->getDataFromSession("database"); // Get installation directory
- $dbConf = $installation;
-// $this->util->dbUtilities->load($this->dhost, $this->dport, $this->duname, $this->dpassword, $this->dname);
-// $res = @mysql_connect(null, 'root', '');
-// if($res) {
-// $running = true;
-// }
- }
} else {
$installation = $this->getDataFromSession("installation"); // Get installation directory
$mysqlPid = $installation['location'].DS."mysql".DS."data".DS."mysqld.pid";
@@ -172,7 +162,7 @@ class migrateComplete extends Step {
if($response['out']) {
$state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key
}
- if($state == "STARTED")
+ if($state == "STARTED" || $state == "RUNNING")
$running = true;
} else {
//TODO : Read fomr my.cnf file
diff --git a/setup/migrate/steps/migrateServices.php b/setup/migrate/steps/migrateServices.php
index a595ee7..71ac4f6 100644
--- a/setup/migrate/steps/migrateServices.php
+++ b/setup/migrate/steps/migrateServices.php
@@ -161,7 +161,7 @@ class migrateServices extends Step
if(!$this->alreadyUninstalled()) { // Pre-check if services are uninstalled
$this->uninstallServices();
}
- $this->uninstallServices();
+ //$this->uninstallServices();
return $this->checkServices();
}
@@ -196,8 +196,8 @@ class migrateServices extends Step
if($response['out']) {
$state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key
}
- if($state == "STARTED") {
- return true;
+ if($state == "STARTED" || $state == 'RUNNING') {
+ $running = true;
}
} else {
$installation = $this->getDataFromSession("installation"); // Get installation directory
@@ -205,10 +205,7 @@ class migrateServices extends Step
if(file_exists($mysqlPid))
$running = true;
}
- if(file_exists($running)) {
- return true;
- }
- return false;
+ return $running;
}
/**
@@ -217,6 +214,7 @@ class migrateServices extends Step
*/
private function uninstallServices() {
$func = OS."Stop";
+ //echo "$func";
$this->$func();
$this->shutdown();
@@ -240,12 +238,18 @@ class migrateServices extends Step
*
*/
private function windowsStop() {
- $cmd = "sc stop KTLucene; sc delete KTLucene";
- $this->util->pexec($cmd);
- $cmd = "sc stop KTScheduler; sc delete KTScheduler";
- $this->util->pexec($cmd);
- $cmd = "sc stop KTOpenoffice; sc delete KTOpenoffice";
- $this->util->pexec($cmd);
+ $cmd = "sc stop KTScheduler";
+ $response = $this->util->pexec($cmd);
+ $cmd = "sc stop KTLucene";
+ $response = $this->util->pexec($cmd);
+ $cmd = "sc stop KTOpenoffice";
+ $response = $this->util->pexec($cmd);
+ $cmd = "sc delete KTOpenoffice";
+ $response = $this->util->pexec($cmd);
+ $cmd = "sc delete KTLucene";
+ $response = $this->util->pexec($cmd);
+ $cmd = "sc delete KTScheduler";
+ $response = $this->util->pexec($cmd);
}
/**
@@ -268,6 +272,7 @@ class migrateServices extends Step
private function shutdownMysql() {
$cmd = "sc stop {$this->mysqlServiceName}";
$response = $this->util->pexec($cmd);
+
}
/**
@@ -280,11 +285,10 @@ class migrateServices extends Step
$serv = $this->util->loadInstallService($className);
$serv->load();
$sStatus = $serv->status();
- if($sStatus == 'STARTED') {
+ if($sStatus == 'STARTED' || $sStatus == 'RUNNING' || $sStatus == 'STOPPED') {
$state = 'cross';
$this->error[] = "Service : {$serv->getName()} could not be uninstalled.
";
$this->serviceCheck = 'cross';
- //$stopmsg = OS.'GetStopMsg';
$this->temp_variables['services'][$serv->getName()]['msg'] = "Service Running";
} else {
$state = 'tick';
@@ -315,8 +319,8 @@ class migrateServices extends Step
if($response['out']) {
$state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key
}
- if($state == "STARTED") {
- return true;
+ if($state == "STARTED" || $state == "RUNNING") {
+ $running = true;
}
} else {
$installation = $this->getDataFromSession("installation"); // Get installation directory
diff --git a/setup/migrate/templates/complete.tpl b/setup/migrate/templates/complete.tpl
index 651be0c..caabd77 100644
--- a/setup/migrate/templates/complete.tpl
+++ b/setup/migrate/templates/complete.tpl
@@ -19,15 +19,9 @@
In order to complete the upgrade process please start the Zend Server MySQL service and then click Next to continue (Click here for help).
-
-
-
-
-
- '>
-
-
-
+ '>
+
+
diff --git a/setup/upgrade/steps/upgradeComplete.php b/setup/upgrade/steps/upgradeComplete.php
index 6047718..89f5378 100644
--- a/setup/upgrade/steps/upgradeComplete.php
+++ b/setup/upgrade/steps/upgradeComplete.php
@@ -55,6 +55,7 @@ class upgradeComplete extends Step {
$this->temp_variables['isCE'] = true;
$this->doRun();
$this->storeSilent();
+ $this->util->deleteMigrateFile();
return 'landing';
}
diff --git a/setup/upgrade/templates/complete.tpl b/setup/upgrade/templates/complete.tpl
index d782900..0cb0af9 100644
--- a/setup/upgrade/templates/complete.tpl
+++ b/setup/upgrade/templates/complete.tpl
@@ -51,5 +51,6 @@
- Finish
+
+
\ No newline at end of file
diff --git a/setup/upgrade/upgradeWizard.php b/setup/upgrade/upgradeWizard.php
index 71b649c..f41a73e 100644
--- a/setup/upgrade/upgradeWizard.php
+++ b/setup/upgrade/upgradeWizard.php
@@ -227,6 +227,8 @@ class UpgradeWizard {
$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');
+ } elseif ($this->util->finishInstall()) { // Check if the installer has completed
+ $this->util->redirect('../../login.php');
}
if($response === true) {
$this->displayUpgrader();
diff --git a/setup/wizard/installUtil.php b/setup/wizard/installUtil.php
index 38cbe9d..9a4f87a 100644
--- a/setup/wizard/installUtil.php
+++ b/setup/wizard/installUtil.php
@@ -522,23 +522,6 @@ class InstallUtil {
}
}
- /**
- * Check if system needs to be accessed
- *
- * @author KnowledgeTree Team
- * @access public
- * @param none
- * @return boolean
- */
- public function finishSpecified() {
- if(isset($_GET['Finish'])) {
- if($_GET['Finish'] == "Finish") {
- return true;
- }
- }
-
- return false;
- }
/**
* Check if system needs to be migrated
@@ -559,7 +542,10 @@ class InstallUtil {
}
public function upgradeInstall() {
- if(isset($_POST['Next'])) {
+ if(isset($_GET['Upgrade'])) {
+ return true;
+ }
+ if(isset($_GET['Next'])) {
if($_POST['Next'] == "Upgrade") {
return true;
}
@@ -569,6 +555,24 @@ class InstallUtil {
}
/**
+ * Check if system needs to be accessed
+ *
+ * @author KnowledgeTree Team
+ * @access public
+ * @param none
+ * @return boolean
+ */
+ public function finishInstall() {
+ if(isset($_GET['Next'])) {
+ if($_GET['Next'] == "Finish") {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
* Check if system needs to be migrated
*
* @author KnowledgeTree Team
diff --git a/setup/wizard/installWizard.php b/setup/wizard/installWizard.php
index 4e56516..978ea2f 100644
--- a/setup/wizard/installWizard.php
+++ b/setup/wizard/installWizard.php
@@ -104,18 +104,6 @@ class InstallWizard {
public function __construct(){}
/**
- * Check if system has been install
- *
- * @author KnowledgeTree Team
- * @access private
- * @param none
- * @return boolean
- */
- private function isSystemInstalled() {
- return $this->util->isSystemInstalled();
- }
-
- /**
* Display the wizard
*
* @author KnowledgeTree Team
@@ -280,17 +268,18 @@ class InstallWizard {
} elseif ($this->getBypass() === "0") {
$this->createInstallFile();
}
- if(!$this->isSystemInstalled()) { // Check if the systems not installed
+ if ($this->util->finishInstall()) { // Check if the installer has completed
+ $this->util->redirect('../../login.php');
+ } elseif ($this->util->upgradeInstall()) { // Check if the upgrader needs to be accessed
+ $this->util->redirect('../upgrade/index.php');
+ }
+ if(!$this->util->isSystemInstalled()) { // Check if the systems not installed
if($this->util->loginSpecified()) { // Back to wizard from upgrader
$this->util->redirect('../../control.php');
} elseif($this->util->migrationSpecified()) { // Check if the migrator needs to be accessed
$this->util->redirect('../migrate/index.php?');
} elseif ($this->util->upgradeSpecified()) { // Check if the upgrader needs to be accessed
$this->util->redirect('../upgrade/index.php?action=installer');
- } elseif ($this->util->finishSpecified()) { // Check if the installer has completed
- $this->util->redirect('../../login.php');
- } elseif ($this->util->upgradeInstall()) { // Check if the upgrader needs to be accessed
- $this->util->redirect('../upgrade/index.php');
}
$response = $this->systemChecks();
if($response === true) {
diff --git a/setup/wizard/templates/complete.tpl b/setup/wizard/templates/complete.tpl
index 2eaec93..331d251 100644
--- a/setup/wizard/templates/complete.tpl
+++ b/setup/wizard/templates/complete.tpl
@@ -199,11 +199,11 @@
$redirect = "http://".$_SERVER['SERVER_NAME'].":$port".$root_url."/admin.php";
?>
- Next
-
+
+
- Finish
-
+
+
js('form.js'); } ?>
\ No newline at end of file