Guillem Bonet
3 years ago
No known key found for this signature in database
GPG Key ID: 48408F6E3AC6F4B4
1 changed files with
10 additions and
0 deletions
-
src/lib/Server.js
|
|
@ -138,6 +138,16 @@ module.exports = class Server { |
|
|
.listen(PORT, () => { |
|
|
.listen(PORT, () => { |
|
|
debug(`Listening on http://0.0.0.0:${PORT}`); |
|
|
debug(`Listening on http://0.0.0.0:${PORT}`); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
process.on('SIGTERM', async () => { |
|
|
|
|
|
debug('SIGTERM signal received: exiting') |
|
|
|
|
|
Util.exec('wg-quick down wg0').then(() => { |
|
|
|
|
|
debug('cleaned up wireguard'); |
|
|
|
|
|
}); |
|
|
|
|
|
this.app.close(() => { |
|
|
|
|
|
debug('HTTP server closed') |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|