diff --git a/dmsctl.bat b/dmsctl.bat index 7771ace..7137907 100644 --- a/dmsctl.bat +++ b/dmsctl.bat @@ -31,7 +31,6 @@ echo start - start the services echo stop - stop the services echo restart - restart the services echo. -echo install - install the services echo uninstall - uninstall the services echo. @@ -64,4 +63,4 @@ sc delete %SchedulerServiceName% sc delete %OpenofficeServiceName% goto end -:end +:end \ No newline at end of file diff --git a/setup/wizard/lib/services/windowsLucene.php b/setup/wizard/lib/services/windowsLucene.php index f27dd5e..0ca683d 100644 --- a/setup/wizard/lib/services/windowsLucene.php +++ b/setup/wizard/lib/services/windowsLucene.php @@ -150,26 +150,6 @@ class windowsLucene extends windowsService { $this->setLuceneOut("lucene-out.txt"); $this->setLuceneError("lucene-err.txt"); } - - - /** - * Retrieve Status Service - * - * @author KnowledgeTree Team - * @access public - * @param none - * @return string - */ - public function status() { - $cmd = "sc query {$this->name}"; - $response = $this->util->pexec($cmd); - if($response['out']) { - $state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key - return $state; - } - - return ''; - } /** * Set Java Directory path @@ -196,7 +176,7 @@ class windowsLucene extends windowsService { return false; } - + /** * Get Java Directory path * @@ -444,6 +424,35 @@ class windowsLucene extends windowsService { return $state; } - + /** + * Start Service + * + * @author KnowledgeTree Team + * @access public + * @param none + * @return mixed + */ + public function start() { // User has to manually start the services + return false; + } + + /** + * Retrieve Status Service + * + * @author KnowledgeTree Team + * @access public + * @param none + * @return string + */ + public function status() { + $cmd = "sc query {$this->name}"; + $response = $this->util->pexec($cmd); + if($response['out']) { + $state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key + return $state; + } + + return ''; + } } ?> \ No newline at end of file diff --git a/setup/wizard/lib/services/windowsOpenOffice.php b/setup/wizard/lib/services/windowsOpenOffice.php index a662419..003d26b 100644 --- a/setup/wizard/lib/services/windowsOpenOffice.php +++ b/setup/wizard/lib/services/windowsOpenOffice.php @@ -236,5 +236,17 @@ class windowsOpenOffice extends windowsService { return ''; } + + /** + * Start Service + * + * @author KnowledgeTree Team + * @access public + * @param none + * @return mixed + */ + public function start() { // User has to manually start the services + return false; + } } ?> \ No newline at end of file diff --git a/setup/wizard/lib/services/windowsScheduler.php b/setup/wizard/lib/services/windowsScheduler.php index b5ccce3..3551623 100644 --- a/setup/wizard/lib/services/windowsScheduler.php +++ b/setup/wizard/lib/services/windowsScheduler.php @@ -173,6 +173,29 @@ class windowsScheduler extends windowsService { return false; } + private function setWinservice($winservice = "winserv.exe") { + $this->winservice = SYS_BIN_DIR . "win32" . DS . $winservice; + } + + private function setOptions() { + $this->options = "-displayname {$this->name} -start auto -binary \"{$this->getSchedulerScriptPath()}\" -headless -invisible "; + } + + private function writeTaskRunner() { + if(DEBUG) { // Check if bin is readable and writable + echo "Attempt to Create {$this->getSchedulerDir()}\\taskrunner.bat
"; + } + if(is_readable($this->varDir."bin") && is_writable($this->varDir."bin")) { + $fp = @fopen($this->getSchedulerDir().""."\\taskrunner.bat", "w+"); + $content = "@echo off \n"; + $content .= "\"".$this->util->useZendPhp()."php.exe\" "."\"{$this->getSchedulerSource()}\""; + @fwrite($fp, $content); + @fclose($fp); + } else { + echo 'Could not write task runner
'; // TODO: Should not reach this point + } + } + /** * Retrieve Status Service * @@ -235,28 +258,17 @@ class windowsScheduler extends windowsService { } return $state; } - - private function setWinservice($winservice = "winserv.exe") { - $this->winservice = SYS_BIN_DIR . "win32" . DS . $winservice; - } - - private function setOptions() { - $this->options = "-displayname {$this->name} -start auto -binary \"{$this->getSchedulerScriptPath()}\" -headless -invisible "; - } - - private function writeTaskRunner() { - if(DEBUG) { // Check if bin is readable and writable - echo "Attempt to Create {$this->getSchedulerDir()}\\taskrunner.bat
"; - } - if(is_readable($this->varDir."bin") && is_writable($this->varDir."bin")) { - $fp = @fopen($this->getSchedulerDir().""."\\taskrunner.bat", "w+"); - $content = "@echo off \n"; - $content .= "\"".$this->util->useZendPhp()."php.exe\" "."\"{$this->getSchedulerSource()}\""; - @fwrite($fp, $content); - @fclose($fp); - } else { - echo 'Could not write task runner
'; // TODO: Should not reach this point - } + + /** + * Start Service + * + * @author KnowledgeTree Team + * @access public + * @param none + * @return mixed + */ + public function start() { // User has to manually start the services + return false; } } ?> \ No newline at end of file