Commit 7ef2397d7aabf96d676aff6444201bdbad71afb4
Merge branch 'edge' of github.com:ktgit/knowledgetree into edge
Showing
4 changed files
with
87 additions
and
10 deletions
dmsctl.bat
0 → 100644
| 1 | +@echo off | ||
| 2 | + | ||
| 3 | +rem KnowledgeTree Control Script | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +rem ============= SET ENVIRONMENT VARIABLES ============== | ||
| 7 | +set ZEND_PATH=C:\PROGRA~1\Zend\ | ||
| 8 | +set INSTALL_PATH=%ZEND_PATH%\KnowledgeTree | ||
| 9 | +set JAVA_BIN=%INSTALL_PATH%\jre\bin\java.exe | ||
| 10 | +set SOFFICE_PATH=%INSTALL_PATH%\openoffice | ||
| 11 | +set SOFFICE_BIN=%SOFFICE_PATH%\program\soffice.exe | ||
| 12 | +set SOFFICE_PORT=8100 | ||
| 13 | + | ||
| 14 | +set OpenofficeServiceName=KTOpenoffice | ||
| 15 | +set SchedulerServiceName=KTScheduler | ||
| 16 | +set LuceneServiceName=KTLucene | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +rem ============= MAIN ============== | ||
| 20 | +if NOT ""%1"" == ""help"" IF NOT ""%1"" == ""start"" IF NOT ""%1"" == ""stop"" IF NOT ""%1"" == ""restart"" IF NOT ""%1"" == ""install"" IF NOT ""%1"" == ""uninstall"" goto help | ||
| 21 | +goto %1 | ||
| 22 | + | ||
| 23 | +:help | ||
| 24 | +echo USAGE: | ||
| 25 | +echo. | ||
| 26 | +echo dmsctl.bat ^<start^|stop^|restart^|install^|uninstall^> | ||
| 27 | +echo. | ||
| 28 | +echo help - this screen | ||
| 29 | +echo. | ||
| 30 | +echo start - start the services | ||
| 31 | +echo stop - stop the services | ||
| 32 | +echo restart - restart the services | ||
| 33 | +echo. | ||
| 34 | +echo install - install the services | ||
| 35 | +echo uninstall - uninstall the services | ||
| 36 | +echo. | ||
| 37 | + | ||
| 38 | +goto end | ||
| 39 | + | ||
| 40 | +:start | ||
| 41 | +echo Starting services | ||
| 42 | +sc start %OpenofficeServiceName% | ||
| 43 | +sc start %LuceneServiceName% | ||
| 44 | +ping -n 7 127.0.0.1 > null | ||
| 45 | +sc start %SchedulerServiceName% | ||
| 46 | +goto end | ||
| 47 | + | ||
| 48 | +:stop | ||
| 49 | +echo Stopping services | ||
| 50 | +sc stop %LuceneServiceName% | ||
| 51 | +sc stop %SchedulerServiceName% | ||
| 52 | +sc stop %OpenofficeServiceName% | ||
| 53 | +ping -n 7 127.0.0.1 > null | ||
| 54 | +IF ""%1"" == ""restart"" goto start | ||
| 55 | +goto end | ||
| 56 | + | ||
| 57 | +:restart | ||
| 58 | +goto stop | ||
| 59 | + | ||
| 60 | +:uninstall | ||
| 61 | +echo Uninstalling services | ||
| 62 | +sc delete %LuceneServiceName% | ||
| 63 | +sc delete %SchedulerServiceName% | ||
| 64 | +sc delete %OpenofficeServiceName% | ||
| 65 | +goto end | ||
| 66 | + | ||
| 67 | +:end |
setup/wizard/steps/configuration.php
| @@ -378,7 +378,7 @@ class configuration extends Step | @@ -378,7 +378,7 @@ class configuration extends Step | ||
| 378 | */ | 378 | */ |
| 379 | private function getServerInfo() | 379 | private function getServerInfo() |
| 380 | { | 380 | { |
| 381 | - $iis = false; | 381 | +// $iis = false; |
| 382 | $script = $_SERVER['SCRIPT_NAME']; | 382 | $script = $_SERVER['SCRIPT_NAME']; |
| 383 | /* | 383 | /* |
| 384 | $file_system_root = $_SERVER['DOCUMENT_ROOT']; | 384 | $file_system_root = $_SERVER['DOCUMENT_ROOT']; |
| @@ -391,15 +391,16 @@ class configuration extends Step | @@ -391,15 +391,16 @@ class configuration extends Step | ||
| 391 | $host = $_SERVER['SERVER_NAME']; | 391 | $host = $_SERVER['SERVER_NAME']; |
| 392 | $port = $_SERVER['SERVER_PORT']; | 392 | $port = $_SERVER['SERVER_PORT']; |
| 393 | $ssl_enabled = isset($_SERVER['HTTPS']) ? (strtolower($_SERVER['HTTPS']) === 'on' ? 'yes' : 'no') : 'no'; | 393 | $ssl_enabled = isset($_SERVER['HTTPS']) ? (strtolower($_SERVER['HTTPS']) === 'on' ? 'yes' : 'no') : 'no'; |
| 394 | - | ||
| 395 | $pos = strpos($script, '/setup/wizard/'); | 394 | $pos = strpos($script, '/setup/wizard/'); |
| 396 | $root_url = substr($script, 0, $pos); | 395 | $root_url = substr($script, 0, $pos); |
| 397 | $root_url = (isset($_POST['root_url'])) ? $_POST['root_url'] : $root_url; | 396 | $root_url = (isset($_POST['root_url'])) ? $_POST['root_url'] : $root_url; |
| 398 | - if($iis) { | ||
| 399 | - $file_system_root = (isset($_POST['file_system_root'])) ? $_POST['file_system_root'] : $file_system_root; | ||
| 400 | - } else { | ||
| 401 | - $file_system_root = (isset($_POST['file_system_root'])) ? $_POST['file_system_root'] : $file_system_root.substr($root_url, 1, strlen($root_url)); | ||
| 402 | - } | 397 | +// echo $file_system_root; |
| 398 | +// if($iis) { | ||
| 399 | + $file_system_root = (isset($_POST['file_system_root'])) ? $_POST['file_system_root'] : $file_system_root; | ||
| 400 | +// } else { | ||
| 401 | +// substr($root_url, 1, strlen($root_url)) | ||
| 402 | +// $file_system_root = (isset($_POST['file_system_root'])) ? $_POST['file_system_root'] : $file_system_root.$root_url; | ||
| 403 | +// } | ||
| 403 | $host = (isset($_POST['host'])) ? $_POST['host'] : $host; | 404 | $host = (isset($_POST['host'])) ? $_POST['host'] : $host; |
| 404 | $port = (isset($_POST['port'])) ? $_POST['port'] : $port; | 405 | $port = (isset($_POST['port'])) ? $_POST['port'] : $port; |
| 405 | $ssl_enabled = (isset($_POST['ssl_enabled'])) ? $_POST['ssl_enabled'] : $ssl_enabled; | 406 | $ssl_enabled = (isset($_POST['ssl_enabled'])) ? $_POST['ssl_enabled'] : $ssl_enabled; |
setup/wizard/steps/services.php
| @@ -222,8 +222,6 @@ class services extends Step | @@ -222,8 +222,6 @@ class services extends Step | ||
| 222 | $this->alreadyInstalled = true; | 222 | $this->alreadyInstalled = true; |
| 223 | $this->serviceCheck = 'tick'; | 223 | $this->serviceCheck = 'tick'; |
| 224 | } else { | 224 | } else { |
| 225 | -// $cmd = SYSTEM_DIR."dmsctl.sh start > /dev/null 2>&1 & echo $!"; | ||
| 226 | -// $this->util->pexec($cmd); // First Attempt to start all using bash script | ||
| 227 | foreach ($this->getServices() as $bin=>$service) { | 225 | foreach ($this->getServices() as $bin=>$service) { |
| 228 | $class = strtolower($service)."Validation"; | 226 | $class = strtolower($service)."Validation"; |
| 229 | $this->$class->preset(); // Sets defaults | 227 | $this->$class->preset(); // Sets defaults |
var/bin/schedulerTask.sh
100644 → 100755