now talking correctly to nginx

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

View File

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