From 10fc883fb38fff9bcfc67d85b512fd26a1551c39 Mon Sep 17 00:00:00 2001 From: Jarrett Jordaan Date: Mon, 7 Sep 2009 16:43:38 +0200 Subject: [PATCH] Story Id:778902 Updated Office Service --- setup/wizard/lib/services/unixOpenOffice.php | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+), 0 deletions(-) diff --git a/setup/wizard/lib/services/unixOpenOffice.php b/setup/wizard/lib/services/unixOpenOffice.php index d07023b..9c02694 100644 --- a/setup/wizard/lib/services/unixOpenOffice.php +++ b/setup/wizard/lib/services/unixOpenOffice.php @@ -42,10 +42,70 @@ class unixOpenOffice extends unixService { + // utility + public $util; + // path to office + private $path; + // host + private $host; + // pid running + private $pidFile; + // port to bind to + private $port; + // bin folder + private $bin; + // office executable + private $soffice; + // office log file + private $log; + + # nohup /home/jarrett/ktdms/openoffice/program/soffice.bin -nofirststartwizard -nologo -headless -accept=socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager &> /home/jarrett/ktdms/var/log/dmsctl.log & public function __construct() { $this->name = "KTOpenOfficeTest"; + $this->util = new InstallUtil(); + } + + public function load() { + $this->setPort("8100"); + $this->setHost("localhost"); + } + private function setPort($port = "8100") { + $this->port = $port; + } + + private function setHost($host = "localhost") { + $this->host = $host; + } + public function install() { + $status = $this->status(); + if($status == '') { + return $this->start(); + } else { + return $status; + } + } + + public function start() { + return false; + $state = $this->status(); + if($state != 'STARTED') { + $cmd = ""; + $cmd .= ""; + $response = $this->util->pexec($cmd); + + return $response; + } elseif ($state == '') { + // Start Service + return true; + } else { + // Service Running Already + return true; + } + + return false; + } } ?> \ No newline at end of file -- libgit2 0.21.4