From 6c6df34c696a4a398a540b827e1c548c1573e7cb Mon Sep 17 00:00:00 2001 From: BrainStone Date: Tue, 11 Oct 2022 02:17:40 +0200 Subject: [PATCH] Make the output redirect work --- src/lib/WireGuard.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index 96566744..6c5f89d8 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -127,9 +127,7 @@ AllowedIPs = ${client.address}/32`; async __syncConfig() { debug('Config syncing...'); - await Util.exec(`${SUDO_STRING} bash -c "wg syncconf wg0 <(wg-quick strip wg0)"`, { - log: `${SUDO_STRING}wg syncconf wg0 <(${SUDO_STRING}wg-quick strip wg0)`, - }); + await Util.exec(`${SUDO_STRING}wg-quick strip wg0 | ${SUDO_STRING}wg syncconf wg0 /dev/fd/0`); debug('Config synced.'); }