Feat: add ability to restart interface (#1740)

add ability to restart interface
This commit is contained in:
Bernd Storath
2025-03-14 12:19:26 +01:00
committed by GitHub
parent 198b240755
commit bbee7e04ed
7 changed files with 72 additions and 2 deletions

View File

@@ -92,6 +92,10 @@ Endpoint = ${userConfig.host}:${userConfig.port}`;
return exec(`wg-quick down ${infName}`);
},
restart: (infName: string) => {
return exec(`wg-quick down ${infName}; wg-quick up ${infName}`);
},
sync: (infName: string) => {
return exec(`wg syncconf ${infName} <(wg-quick strip ${infName})`);
},