From 75d9a199f65bda776ca9b0df6a4fb7335e83d022 Mon Sep 17 00:00:00 2001 From: Chanchai Date: Wed, 28 Feb 2024 09:39:15 +0700 Subject: [PATCH] fixup: lint errors --- src/lib/WireGuard.js | 3 ++- src/server.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index 5d170286..ef72bec7 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -322,4 +322,5 @@ Endpoint = ${WG_HOST}:${WG_PORT}`; async Shutdown() { await Util.exec('wg-quick down wg0').catch(() => { }); } -}; + +}; \ No newline at end of file diff --git a/src/server.js b/src/server.js index 1b1164e9..916be6d7 100644 --- a/src/server.js +++ b/src/server.js @@ -14,13 +14,16 @@ WireGuard.getConfig() }); // Handle terminate signal -process.on('SIGTERM', async() => { +process.on('SIGTERM', async () => { + // eslint-disable-next-line no-console console.log('SIGTERM signal received.'); await WireGuard.Shutdown(); + // eslint-disable-next-line no-process-exit process.exit(0); }); -// Handle interupt signal +// Handle interrupt signal process.on('SIGINT', () => { + // eslint-disable-next-line no-console console.log('SIGINT signal received.'); }); \ No newline at end of file