Commit a269bd07090b37e01689c6cc4c4bec07c1930793
1 parent
b135dd5d
Story Id:1627025 Updated dmsctl.bat
Committed by: Jarrett Jordaan Reviewed by: Paul Barrett
Showing
1 changed file
with
20 additions
and
9 deletions
dmsctl.bat
| @@ -4,10 +4,12 @@ rem KnowledgeTree Control Script | @@ -4,10 +4,12 @@ rem KnowledgeTree Control Script | ||
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | rem ============= SET ENVIRONMENT VARIABLES ============== | 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 | 7 | +set INSTALL_PATH=%CD% |
| 8 | +cd .. | ||
| 9 | +set ZEND_PATH=%CD% | ||
| 10 | +cd %INSTALL_PATH% | ||
| 11 | +set JAVA_BIN=%ZEND_PATH%\jre\bin\java.exe | ||
| 12 | +set SOFFICE_PATH=%ZEND_PATH%\openoffice | ||
| 11 | set SOFFICE_BIN=%SOFFICE_PATH%\program\soffice.exe | 13 | set SOFFICE_BIN=%SOFFICE_PATH%\program\soffice.exe |
| 12 | set SOFFICE_PORT=8100 | 14 | set SOFFICE_PORT=8100 |
| 13 | 15 | ||
| @@ -15,9 +17,8 @@ set OpenofficeServiceName=KTOpenoffice | @@ -15,9 +17,8 @@ set OpenofficeServiceName=KTOpenoffice | ||
| 15 | set SchedulerServiceName=KTScheduler | 17 | set SchedulerServiceName=KTScheduler |
| 16 | set LuceneServiceName=KTLucene | 18 | set LuceneServiceName=KTLucene |
| 17 | 19 | ||
| 18 | - | ||
| 19 | rem ============= MAIN ============== | 20 | 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 | +if NOT ""%1"" == ""help"" IF NOT ""%1"" == ""start"" IF NOT ""%1"" == ""path"" IF NOT ""%1"" == ""stop"" IF NOT ""%1"" == ""restart"" IF NOT ""%1"" == ""install"" IF NOT ""%1"" == ""uninstall"" goto help |
| 21 | goto %1 | 22 | goto %1 |
| 22 | 23 | ||
| 23 | :help | 24 | :help |
| @@ -64,11 +65,21 @@ sc delete %SchedulerServiceName% | @@ -64,11 +65,21 @@ sc delete %SchedulerServiceName% | ||
| 64 | sc delete %OpenofficeServiceName% | 65 | sc delete %OpenofficeServiceName% |
| 65 | goto end | 66 | goto end |
| 66 | 67 | ||
| 68 | +:path | ||
| 69 | +echo ZEND_PATH == %ZEND_PATH% | ||
| 70 | +echo INSTALL_PATH == %INSTALL_PATH% | ||
| 71 | +echo JAVA_BIN == %JAVA_BIN% | ||
| 72 | +echo SOFFICE_PATH == %SOFFICE_PATH% | ||
| 73 | +echo SOFFICE_BIN == %SOFFICE_BIN% | ||
| 74 | +goto end | ||
| 75 | + | ||
| 67 | :install | 76 | :install |
| 68 | echo Installing services | 77 | echo Installing services |
| 69 | -call "%INSTALL_PATH%\var\bin\officeinstall.bat" | ||
| 70 | -call "%INSTALL_PATH%\var\bin\schedulerinstall.bat" | ||
| 71 | -call "%INSTALL_PATH%\var\bin\luceneinstall.bat" | 78 | +IF EXIST "%INSTALL_PATH%\var\bin\officeinstall.bat" call "%INSTALL_PATH%\var\bin\officeinstall.bat" |
| 79 | +echo The Open Office automatic service was successfully installed | ||
| 80 | +IF EXIST "%INSTALL_PATH%\var\bin\schedulerinstall.bat" call "%INSTALL_PATH%\var\bin\schedulerinstall.bat" | ||
| 81 | +echo The Scheduler automatic service was successfully installed | ||
| 82 | +IF EXIST "%INSTALL_PATH%\var\bin\luceneinstall.bat" call "%INSTALL_PATH%\var\bin\luceneinstall.bat" | ||
| 72 | goto end | 83 | goto end |
| 73 | 84 | ||
| 74 | :end | 85 | :end |
| 75 | \ No newline at end of file | 86 | \ No newline at end of file |