dmsctl.bat
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@echo off
rem KnowledgeTree Control Script
rem ============= SET ENVIRONMENT VARIABLES ==============
set ZEND_PATH=C:\PROGRA~1\Zend\
set INSTALL_PATH=%ZEND_PATH%\KnowledgeTree
set JAVA_BIN=%INSTALL_PATH%\jre\bin\java.exe
set SOFFICE_PATH=%INSTALL_PATH%\openoffice
set SOFFICE_BIN=%SOFFICE_PATH%\program\soffice.exe
set SOFFICE_PORT=8100
set OpenofficeServiceName=KTOpenoffice
set SchedulerServiceName=KTScheduler
set LuceneServiceName=KTLucene
rem ============= MAIN ==============
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
goto %1
:help
echo USAGE:
echo.
echo dmsctl.bat ^<start^|stop^|restart^|install^|uninstall^>
echo.
echo help - this screen
echo.
echo start - start the services
echo stop - stop the services
echo restart - restart the services
echo.
echo install - install the services
echo uninstall - uninstall the services
echo.
goto end
:start
echo Starting services
sc start %OpenofficeServiceName%
sc start %LuceneServiceName%
ping -n 7 127.0.0.1 > null
sc start %SchedulerServiceName%
goto end
:stop
echo Stopping services
sc stop %LuceneServiceName%
sc stop %SchedulerServiceName%
sc stop %OpenofficeServiceName%
ping -n 7 127.0.0.1 > null
IF ""%1"" == ""restart"" goto start
goto end
:restart
goto stop
:uninstall
echo Uninstalling services
sc delete %LuceneServiceName%
sc delete %SchedulerServiceName%
sc delete %OpenofficeServiceName%
goto end
:install
echo Installing services
call "%INSTALL_PATH%\var\bin\officeinstall.bat"
call "%INSTALL_PATH%\var\bin\schedulerinstall.bat"
call "%INSTALL_PATH%\var\bin\luceneinstall.bat"
goto end
:end