From 11f116c801d5fb1f1fd93c8935ee6be99d5715ac Mon Sep 17 00:00:00 2001 From: BrainStone Date: Tue, 11 Oct 2022 01:56:36 +0200 Subject: [PATCH] Fix execution command with command redirect --- src/lib/WireGuard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index fd6dbb5e..96566744 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -127,7 +127,9 @@ AllowedIPs = ${client.address}/32`; async __syncConfig() { debug('Config syncing...'); - await Util.exec(`${SUDO_STRING}wg syncconf wg0 <(${SUDO_STRING}wg-quick strip wg0)`); + 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)`, + }); debug('Config synced.'); }