fix webhook

This commit is contained in:
Djkato 2023-02-08 18:24:40 +01:00
parent 163f0a7172
commit 0200c10e1b

View file

@ -9,8 +9,8 @@ http.createServer(function (req, res) {
req.on('data', function (chunk) {
let sig = "sha1=" + crypto.createHmac('sha1', secret).update(chunk.toString()).digest('hex')
if (req.headers['x-hub-signature'] == sig) {
exec('cd ' + repo + ' && git pull' + '&& npm install' + 'pm2 restart 0')
if (req.headers["x-hub-signature"] == sig) {
exec("pm2 stop 'MOOver - main' && " + " cd " + repo + "&& git pull" + " && npm install" + " pm2 start 'MOOver - main'")
}
})