listen in sigint in docker
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
import * as Logger from 'log4js'
|
import * as Logger from 'log4js'
|
||||||
import { Plugin, socketioRPC, ConfigLoader } from 'frontblock-generic/Plugin';
|
import { socketioRPC, ConfigLoader } from 'frontblock-generic/Plugin';
|
||||||
import { ErrorResponse, SuccessResponse } from 'frontblock-generic/Types';
|
import { ErrorResponse, SuccessResponse } from 'frontblock-generic/Types';
|
||||||
import { default as PluginManagerPlugin } from './PluginManager/Plugin'
|
import { default as PluginManagerPlugin } from './PluginManager/Plugin'
|
||||||
import express = require('express');
|
import express = require('express');
|
||||||
import http = require('http');
|
import http = require('http');
|
||||||
import bsock = require('bsock');
|
import bsock = require('bsock');
|
||||||
import { type } from 'os';
|
|
||||||
|
|
||||||
const kfs = require("key-file-storage").default('kfs')
|
const kfs = require("key-file-storage").default('kfs')
|
||||||
|
|
||||||
@@ -186,7 +185,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
|||||||
this.express.use('/', express.static('static'))
|
this.express.use('/', express.static('static'))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the compiled FrontendPlugins
|
* get the compiled FrontendPlugins.js
|
||||||
*/
|
*/
|
||||||
this.express.get('/plugins/:id'+".js", (request, response) => {
|
this.express.get('/plugins/:id'+".js", (request, response) => {
|
||||||
let frontend = this.pm.getFrontend(request.params.id)
|
let frontend = this.pm.getFrontend(request.params.id)
|
||||||
@@ -302,3 +301,10 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
new FrontblockAdmin()
|
new FrontblockAdmin()
|
||||||
|
|
||||||
|
|
||||||
|
process.on( 'SIGINT', function() {
|
||||||
|
logger.info( "Gracefully shutting down from SIGINT (Ctrl-C)" );
|
||||||
|
// some other closing procedures go here
|
||||||
|
process.exit( );
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user