now talking correctly to nginx

This commit is contained in:
Philipp Kunz 2016-07-25 03:21:28 +02:00
parent b5a27d5108
commit e2639fd0a9
2 changed files with 7 additions and 5 deletions

View File

@ -38,7 +38,7 @@ class NginxProcess {
this.start(); this.start();
} }
else { else {
this.nginxChildProcess.kill("SIGHUP"); plugins.shelljs.exec("nginx -s reload");
} }
; ;
plugins.beautylog.ok("NginxProcess has loaded the new config!"); plugins.beautylog.ok("NginxProcess has loaded the new config!");
@ -52,7 +52,8 @@ 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("SIGTERM"); plugins.shelljs.exec("nginx -s quit");
this.started = false;
plugins.beautylog.info("stopped Nginx!"); plugins.beautylog.info("stopped Nginx!");
} }
else { else {
@ -72,4 +73,4 @@ class NginxProcess {
; ;
} }
exports.NginxProcess = NginxProcess; exports.NginxProcess = NginxProcess;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5jbGFzc2VzLm5naW54cHJvY2Vzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bmdpbnguY2xhc3Nlcy5uZ2lueHByb2Nlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHNCQUFzQixDQUFDLENBQUE7QUFDaEQsTUFBWSxLQUFLLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUk1QztJQUlJLFlBQVksY0FBYztRQUgxQixZQUFPLEdBQVksS0FBSyxDQUFDO1FBSXJCLElBQUksQ0FBQyxXQUFXLEdBQUcsY0FBYyxDQUFDO0lBQ3RDLENBQUM7O0lBRUQ7O09BRUc7SUFDSCxLQUFLO1FBQ0QsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQ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QUFXLENBQUMsQ0FBQyxDQUFDO1lBQy9DLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDO1lBQ3RDLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxDQUFDO1lBQ3JCLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFDN0MsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztRQUNwRCxDQUFDO1FBQUEsQ0FBQztRQUNGLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNmLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO0lBQ3hCLENBQUM7O0lBRUQ7O09BRUc7SUFDSCxLQUFLO1FBQ0QsTUFBTSxDQUFDO0lBQ1gsQ0FBQzs7QUFDTCxDQUFDO0FBakVZLG9CQUFZLGVBaUV4QixDQUFBIn0=

View File

@ -39,7 +39,7 @@ export class NginxProcess {
if(this.started == false){ if(this.started == false){
this.start() this.start()
} else { } else {
this.nginxChildProcess.kill("SIGHUP"); plugins.shelljs.exec("nginx -s reload");
}; };
plugins.beautylog.ok("NginxProcess has loaded the new config!") plugins.beautylog.ok("NginxProcess has loaded the new config!")
done.resolve(); done.resolve();
@ -52,7 +52,8 @@ 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("SIGTERM"); plugins.shelljs.exec("nginx -s quit");
this.started = false;
plugins.beautylog.info("stopped Nginx!"); plugins.beautylog.info("stopped Nginx!");
} else { } else {
plugins.beautylog.log("nginx already stopped!"); plugins.beautylog.log("nginx already stopped!");