Commit 15830591609ed154377ae98fb7d9be7ccddd2a1c

Authored by Paul Barrett
2 parents 5615b79f cfaa99dc

Merge branch 'edge' of github.com:ktgit/knowledgetree into edge

dmsctl.sh
... ... @@ -302,7 +302,7 @@ firstrun() {
302 302 fi
303 303 fi
304 304  
305   - touch $INSTALL_PATH/var/bin/.dmsinit.lock
  305 + touch $INSTALL_PATH/var/bin/dmsinit.lock
306 306  
307 307 $ZEND_DIR/bin/zendctl.sh restart
308 308 }
... ... @@ -320,7 +320,7 @@ if [ "x$3" != "x" ]; then
320 320 fi
321 321  
322 322 # Are we running for first time
323   -[[ -e $INSTALL_PATH/var/bin/.dmsinit.lock ]] || firstrun
  323 +[[ -e $INSTALL_PATH/var/bin/dmsinit.lock ]] || firstrun
324 324  
325 325 case $1 in
326 326 help) help
... ...
setup/wizard/steps/database.php
... ... @@ -776,17 +776,6 @@ class database extends Step
776 776 }
777 777  
778 778 private function writeBinaries() {
779   - $services = $this->util->getDataFromSession('services');
780   - $binaries = $services['binaries'];
781   - if($binaries) {
782   - foreach ($binaries as $k=>$bin) {
783   - if($k != 1) {
784   - $updateBin = 'UPDATE config_settings c SET c.value = "'.str_replace('\\', '\\\\', $bin).'" where c.group_name = "externalBinary" and c.display_name = "'.$k.'";';
785   - $this->util->dbUtilities->query($updateBin);
786   - }
787   - }
788   - }
789   -
790 779 // if Windows, attempt to insert full paths to binaries
791 780 if (WINDOWS_OS) {
792 781 $winBinaries = array('php' => array(0 => 'externalBinary', 1 => 'ZendServer\bin\php.exe'),
... ... @@ -825,7 +814,21 @@ class database extends Step
825 814 // if Linux?
826 815 else {
827 816 // TODO python binary?
828   - // TODO other binaries?
  817 + // Python
  818 + $services = $this->util->getDataFromSession('services');
  819 + $binaries = $services['binaries'];
  820 + $python = "/usr/bin/python";
  821 + if(file_exists($python)) {
  822 + $binaries['python'] = $python;
  823 + }
  824 + if($binaries) {
  825 + foreach ($binaries as $k=>$bin) {
  826 + if($k != 1) {
  827 + $updateBin = 'UPDATE config_settings c SET c.value = "'.str_replace('\\', '\\\\', $bin).'" where c.group_name = "externalBinary" and c.display_name = "'.$k.'";';
  828 + $this->util->dbUtilities->query($updateBin);
  829 + }
  830 + }
  831 + }
829 832 }
830 833 }
831 834  
... ...
setup/wizard/templates/complete.tpl
... ... @@ -17,7 +17,7 @@
17 17 <?php if(!$servicesValidation) { ?>
18 18 <h3>Services</h3>
19 19 The KnowledgeTree services need to be started to allow for optimal functioning of the search, indexing and pdf generation.
20   - <?php if(WINDOWS_OS) { ?>
  20 + <?php if(!WINDOWS_OS) { ?>
21 21 To start the services, execute the dmsctl.sh shell script in the KnowledgeTree directory from a terminal.<br/><br/>
22 22 <?php } else { ?>
23 23 To start the services, execute the dmsctl.bat batch file in the KnowledgeTree directory from a command prompt, run as administrator.<br/><br/>
... ... @@ -25,6 +25,7 @@
25 25 <p class="disclaimer">
26 26 <?php if(WINDOWS_OS) { ?>
27 27 cd KnowledgeTree_Installation_Folder<br/>
  28 + dmsctl.bat install
28 29 dmsctl.bat start
29 30 <?php } else { ?>
30 31 cd /usr/share/knowledgetree-ce<br/>
... ...