feat: support graceful shutdown

This commit is contained in:
Chanchai 2024-02-21 13:56:39 +07:00 committed by Philip H
parent f603d6b5da
commit 6604e44ea3
3 changed files with 22 additions and 1 deletions

View file

@ -318,4 +318,8 @@ Endpoint = ${WG_HOST}:${WG_PORT}`;
await this.saveConfig();
}
// Shutdown wireguard
async Shutdown() {
await Util.exec('wg-quick down wg0').catch(() => { });
}
};