8 changed files with 148 additions and 121 deletions
			
			
		@ -0,0 +1,21 @@ | 
				
			|||
{ | 
				
			|||
    "env": { | 
				
			|||
        "node": true | 
				
			|||
    }, | 
				
			|||
    "extends": "eslint:recommended", | 
				
			|||
    "rules": { | 
				
			|||
        "no-console": "off", | 
				
			|||
        "indent": [ | 
				
			|||
            "error", | 
				
			|||
            "tab" | 
				
			|||
        ], | 
				
			|||
        "linebreak-style": [ | 
				
			|||
            "error", | 
				
			|||
            "unix" | 
				
			|||
        ], | 
				
			|||
        "semi": [ | 
				
			|||
            "error", | 
				
			|||
            "always" | 
				
			|||
        ] | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -1,14 +1,14 @@ | 
				
			|||
var { execSync } = require('child_process'); | 
				
			|||
var execSync = require('child_process').execSync; | 
				
			|||
 | 
				
			|||
function nginxReload() { | 
				
			|||
	execSync('service nginx reload', function (error, stdout, stderr) { | 
				
			|||
		if (error) { | 
				
			|||
			console.error(`exec error: ${error}`); | 
				
			|||
			console.log(`stdout: ${stdout}`); | 
				
			|||
			console.log(`stderr: ${stderr}`); | 
				
			|||
			console.error("exec error: " + error); | 
				
			|||
			console.log("stdout: " + stdout); | 
				
			|||
			console.log("stderr: " + stderr); | 
				
			|||
			return; | 
				
			|||
		} | 
				
			|||
	}) | 
				
			|||
	}); | 
				
			|||
} | 
				
			|||
 | 
				
			|||
module.exports = nginxReload; | 
				
			|||
					Loading…
					
					
				
		Reference in new issue