fixup: lint errors
This commit is contained in:
parent
6604e44ea3
commit
a6d092dd87
|
@ -322,4 +322,5 @@ Endpoint = ${WG_HOST}:${WG_PORT}`;
|
||||||
async Shutdown() {
|
async Shutdown() {
|
||||||
await Util.exec('wg-quick down wg0').catch(() => { });
|
await Util.exec('wg-quick down wg0').catch(() => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,13 +14,16 @@ WireGuard.getConfig()
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle terminate signal
|
// Handle terminate signal
|
||||||
process.on('SIGTERM', async() => {
|
process.on('SIGTERM', async () => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log('SIGTERM signal received.');
|
console.log('SIGTERM signal received.');
|
||||||
await WireGuard.Shutdown();
|
await WireGuard.Shutdown();
|
||||||
|
// eslint-disable-next-line no-process-exit
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle interupt signal
|
// Handle interupt signal
|
||||||
process.on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log('SIGINT signal received.');
|
console.log('SIGINT signal received.');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue