Skip to content

Commit

Permalink
fixup: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pheiduck committed Feb 29, 2024
1 parent 5977438 commit 5a87aa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib/WireGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,5 @@ Endpoint = ${WG_HOST}:${WG_PORT}`;
async Shutdown() {
await Util.exec('wg-quick down wg0').catch(() => { });
}

};
7 changes: 5 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
process.on('SIGINT', () => {
// eslint-disable-next-line no-console
console.log('SIGINT signal received.');
});
});

0 comments on commit 5a87aa5

Please sign in to comment.