listen in sigint in docker
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
'use strict'
|
||||
|
||||
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 { default as PluginManagerPlugin } from './PluginManager/Plugin'
|
||||
import express = require('express');
|
||||
import http = require('http');
|
||||
import bsock = require('bsock');
|
||||
import { type } from 'os';
|
||||
|
||||
const kfs = require("key-file-storage").default('kfs')
|
||||
|
||||
@@ -186,7 +185,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
||||
this.express.use('/', express.static('static'))
|
||||
|
||||
/**
|
||||
* get the compiled FrontendPlugins
|
||||
* get the compiled FrontendPlugins.js
|
||||
*/
|
||||
this.express.get('/plugins/:id'+".js", (request, response) => {
|
||||
let frontend = this.pm.getFrontend(request.params.id)
|
||||
@@ -302,3 +301,10 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
||||
}
|
||||
|
||||
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