Adding additional Start Command
This commit is contained in:
parent
28291e3b8e
commit
36bfe36467
@ -2,4 +2,4 @@ set DIR=%~dp0
|
||||
cd "%DIR%"
|
||||
git clone --branch dev https://info.system:ZeMA123$@git.zema.de/tfs/ZISS/_git/ZISS-Kernel-2.0
|
||||
cd ZISS-Kernel-2.0
|
||||
call ./00-install.bat
|
||||
call ./07-WAMO-Update.bat
|
@ -57,12 +57,12 @@ node .\dist\lib\cli\ioServerService.js -m install
|
||||
@REM now reinstall the services
|
||||
|
||||
@REM Install all Services
|
||||
for /f "delims=" %%a in ('dir /s /o /b *01-install.bat') do (
|
||||
for /f "delims=" %%a in ('dir /s /o /b *00-install.bat') do (
|
||||
echo %%a
|
||||
call %%a
|
||||
)
|
||||
@REM Start all Services
|
||||
for /f "delims=" %%a in ('dir /s /o /b *02-restart.bat') do (
|
||||
for /f "delims=" %%a in ('dir /s /o /b *01-start.bat') do (
|
||||
echo %%a
|
||||
call %%a
|
||||
)
|
@ -314,7 +314,7 @@ export async function createService(
|
||||
)
|
||||
},
|
||||
{
|
||||
name: "01-install.bat",
|
||||
name: "00-install.bat",
|
||||
render: handlebars.compile(`set DIR=%~dp0
|
||||
cd "%DIR%"
|
||||
cd ..
|
||||
@ -323,6 +323,16 @@ cd ..
|
||||
node {{{pathToFolder}}}\\service.js -m install
|
||||
`)
|
||||
},
|
||||
{
|
||||
name: "01-start.bat",
|
||||
render: handlebars.compile(`set DIR=%~dp0
|
||||
cd "%DIR%"
|
||||
cd ..
|
||||
cd ..
|
||||
cd ..
|
||||
node {{{pathToFolder}}}\\service.js -m start
|
||||
`)
|
||||
},
|
||||
{
|
||||
name: "02-restart.bat",
|
||||
render: handlebars.compile(`set DIR=%~dp0
|
||||
|
@ -95,7 +95,7 @@ switch (parser.parseArgs().mode) {
|
||||
// process is available as a service.
|
||||
svc.on("install", function () {
|
||||
svc.start();
|
||||
logger.info("bridgeLayer installed and started");
|
||||
logger.info("ioServer installed and started");
|
||||
});
|
||||
|
||||
svc.install();
|
||||
@ -112,11 +112,11 @@ switch (parser.parseArgs().mode) {
|
||||
break;
|
||||
case "restart":
|
||||
svc.on("start", function () {
|
||||
logger.info("bridgeLayer started");
|
||||
logger.info("ioServer started");
|
||||
});
|
||||
svc.on("stop", function () {
|
||||
logger.info(
|
||||
"bridgeLayer stopped / not running. Manually Starting Service again"
|
||||
"ioServer stopped / not running. Manually Starting Service again"
|
||||
);
|
||||
try {
|
||||
svc.start();
|
||||
@ -125,13 +125,20 @@ switch (parser.parseArgs().mode) {
|
||||
}
|
||||
});
|
||||
svc.on("error", function (error) {
|
||||
logger.error("bridgeLayer stopped");
|
||||
logger.error("ioServer stopped");
|
||||
});
|
||||
|
||||
// Manually stop the Service
|
||||
svc.stop();
|
||||
break;
|
||||
|
||||
case "start":
|
||||
svc.on("start", function () {
|
||||
logger.info("ioServer started");
|
||||
});
|
||||
svc.start();
|
||||
break;
|
||||
|
||||
default:
|
||||
logger.error("Invalid mode have been provided");
|
||||
}
|
||||
|
@ -131,7 +131,12 @@ switch (parser.parseArgs().mode) {
|
||||
// Manually stop the Service
|
||||
svc.stop();
|
||||
break;
|
||||
|
||||
case "start":
|
||||
svc.on("start", function () {
|
||||
logger.info("{{name}} started");
|
||||
});
|
||||
svc.start();
|
||||
break;
|
||||
default:
|
||||
logger.error("Invalid mode have been provided");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user