now ending nginx after test

This commit is contained in:
Philipp Kunz 2016-07-25 02:57:17 +02:00
parent 52c3b40879
commit f32002309d
5 changed files with 15 additions and 5 deletions

View File

@ -52,7 +52,7 @@ class NginxProcess {
stop() { stop() {
let done = plugins.q.defer(); let done = plugins.q.defer();
if (typeof this.nginxChildProcess != "undefined") { if (typeof this.nginxChildProcess != "undefined") {
this.nginxChildProcess.kill(); this.nginxChildProcess.kill("SIGTERM");
plugins.beautylog.info("stopped Nginx!"); plugins.beautylog.info("stopped Nginx!");
} }
else { else {
@ -72,4 +72,4 @@ class NginxProcess {
; ;
} }
exports.NginxProcess = NginxProcess; exports.NginxProcess = NginxProcess;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5jbGFzc2VzLm5naW54cHJvY2Vzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bmdpbnguY2xhc3Nlcy5uZ2lueHByb2Nlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHNCQUFzQixDQUFDLENBQUE7QUFDaEQsTUFBWSxLQUFLLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUk1QztJQUlJLFlBQVksY0FBYztRQUgxQixZQUFPLEdBQVksS0FBSyxDQUFDO1FBSXJCLElBQUksQ0FBQyxXQUFXLEdBQUcsY0FBYyxDQUFDO0lBQ3RDLENBQUM7O0lBRUQ7O09BRUc7SUFDSCxLQUFLO1FBQ0QsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUM3QixFQUFFLENBQUMsQ0FBQyxPQUFPLElBQUksQ0FBQyxpQkFBaUIsSUFBSSxXQUFXLENBQUMsQ0FBQSxDQUFDO1lBQzlDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxPQUFPLENBQUMsWUFBWSx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QUMsSUFBSSxDQUFDLENBQUM7WUFDSixPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyx3QkFBd0IsQ0FBQyxDQUFDO1FBQ3BELENBQUM7UUFBQSxDQUFDO1FBQ0YsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2YsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7SUFDeEIsQ0FBQzs7SUFFRDs7T0FFRztJQUNILEtBQUs7UUFDRCxNQUFNLENBQUM7SUFDWCxDQUFDOztBQUNMLENBQUM7QUFoRVksb0JBQVksZUFnRXhCLENBQUEifQ==

View File

@ -51,6 +51,11 @@ describe("smartnginx", function () {
}); });
}); });
}); });
describe(".stop", function () {
it("should end the process", function () {
testNginxConfig.nginxProcess.stop();
}); });
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsTUFBTyxJQUFJLFdBQVcsTUFBTSxDQUFDLENBQUM7QUFDOUIsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUNoQix1QkFBbUIsTUFBTSxDQUFDLENBQUE7QUFDMUIsTUFBWSxVQUFVLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFFNUMsb0JBQW9CO0FBQ3BCLElBQUksUUFBUSxHQUFHLElBQUksV0FBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsRUFBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsRUFBQyxRQUFRLENBQUMsQ0FBQyxDQUFDO0FBQ3pFLFFBQVEsQ0FBQyxZQUFZLEVBQUM7SUFDbEIsSUFBSSxlQUFzQyxDQUFDO0lBQzNDLElBQUksZUFBb0MsQ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UMsd0JBQXdCLEVBQUM7Z0JBQ3hCLGVBQWUsQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFLENBQUM7WUFDeEMsQ0FBQyxDQUFDLENBQUE7UUFDTixDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQyxDQUFDO0FBQ1AsQ0FBQyxDQUFDLENBQUMifQ==

View File

@ -51,5 +51,10 @@ describe("smartnginx",function(){
}); });
}) })
}); });
describe(".stop",function(){
it("should end the process",function(){
testNginxConfig.nginxProcess.stop();
})
})
}); });
}); });

View File

@ -52,7 +52,7 @@ export class NginxProcess {
stop() { stop() {
let done = plugins.q.defer(); let done = plugins.q.defer();
if (typeof this.nginxChildProcess != "undefined") { if (typeof this.nginxChildProcess != "undefined") {
this.nginxChildProcess.kill(); this.nginxChildProcess.kill("SIGTERM");
plugins.beautylog.info("stopped Nginx!"); plugins.beautylog.info("stopped Nginx!");
} else { } else {
plugins.beautylog.log("nginx already stopped!"); plugins.beautylog.log("nginx already stopped!");