Commit 28b6e81c836d90a0b271f6807528213fc1dcac22

Authored by Jarrett Jordaan
1 parent 70efb8b8

KTC-860: Updated services description on x64 systems.

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/wizard/lib/services/windowsLucene.php
... ... @@ -421,23 +421,15 @@ class windowsLucene extends windowsService {
421 421 */
422 422 public function install() {
423 423 $state = $this->status();
424   -// if($state == '') {
425 424 $luceneExe = $this->getLuceneExe();
426 425 $luceneSource = $this->getLuceneSource();
427 426 $luceneDir = $this->getluceneDir();
428   -// if($luceneExe && $luceneSource && $luceneDir) {
429   - $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";
430   - if(DEBUG) {
431   - echo "$cmd<br/>";
432   - return false;
433   - }
434   - $this->writeLuceneInstall($cmd);
435   - //$response = $this->util->pexec($cmd);
436   -// return $response;
437   -// }
438   - return $state;
439   -// }
440   -
  427 + $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";
  428 + if(DEBUG) {
  429 + echo "$cmd<br/>";
  430 + return false;
  431 + }
  432 + $this->writeLuceneInstall($cmd);
441 433 return $state;
442 434 }
443 435  
... ...
setup/wizard/lib/services/windowsOpenOffice.php
... ... @@ -214,7 +214,7 @@ class windowsOpenOffice extends windowsService {
214 214 if($status == '') {
215 215 $binary = $this->getBin();
216 216 if($binary != '') {
217   - $cmd = "\"{$this->winservice}\" install {$this->name} -description {$this->description} -displayname {$this->name} -start auto \"".$binary."\" -headless -invisible -nofirststartwizard -\"accept=socket,host={$this->host},port={$this->port};urp;\"";;
  217 + $cmd = "\"{$this->winservice}\" install \"{$this->name}\" -description \"{$this->description}\" -displayname \"{$this->name}\" -start auto \"".$binary."\" -headless -invisible -nofirststartwizard -\"accept=socket,host={$this->host},port={$this->port};urp;\"";;
218 218 if(DEBUG) {
219 219 echo "$cmd<br/>";
220 220 return false;
... ...
setup/wizard/lib/services/windowsScheduler.php
... ... @@ -182,7 +182,7 @@ class windowsScheduler extends windowsService {
182 182 }
183 183  
184 184 private function setOptions() {
185   - $this->options = "-displayname {$this->name} -description {$this->description} -start auto -binary \"{$this->getSchedulerScriptPath()}\" -headless -invisible ";
  185 + $this->options = "-displayname \"{$this->name}\" -description \"{$this->description}\" -start auto -binary \"{$this->getSchedulerScriptPath()}\" -headless -invisible ";
186 186 }
187 187  
188 188 private function writeTaskRunner() {
... ... @@ -235,36 +235,9 @@ class windowsScheduler extends windowsService {
235 235 $state = $this->status();
236 236 if($state == '') {
237 237 $this->writeTaskRunner();
238   - //if (function_exists('win32_create_service')) { // TODO what if it does not exist? check how the dmsctl.bat does this
239   -// if(DEBUG) {
240   -// echo '<pre>';
241   -// print_r(array('service' => $this->name, 'display' => $this->name, 'path' => $this->getSchedulerScriptPath()));
242   -// echo '</pre>';
243   -// echo '<pre>';
244   -// print_r(file_get_contents($this->getSchedulerScriptPath()));
245   -// echo '</pre>';
246   -// return ;
247   -// }
248   - /*
249   - $response = win32_create_service(array(
250   - 'service' => $this->name,
251   - 'display' => $this->name,
252   - 'path' => $this->getSchedulerScriptPath()
253   - ));
254   - return $response;
255   - */
256   - //} else { // Attempt to use the winserv
257   - // TODO: Add service using winserv
258   - $this->setWinservice();
259   - $this->setOptions();
260   - $cmd = "\"{$this->winservice}\" install $this->name $this->options";
261   - if(DEBUG) {
262   - echo "$cmd<br/>";
263   - return false;
264   - }
265   - //$response = $this->util->pexec($cmd);
266   - //return $response;
267   - //}
  238 + $this->setWinservice();
  239 + $this->setOptions();
  240 + $cmd = "\"{$this->winservice}\" install $this->name $this->options";
268 241 $this->writeSchedulerInstall($cmd);
269 242 }
270 243 return $state;
... ... @@ -287,7 +260,7 @@ class windowsScheduler extends windowsService {
287 260 }
288 261  
289 262 public function getStopMsg($installDir) {
290   - return "";//"Execute from command prompt : $installDir/dmsctl.bat stop";
  263 + return "";
291 264 }
292 265 }
293 266 ?>
294 267 \ No newline at end of file
... ...