From 04c1c2dae2cd8a3086178200ba7d72b46e77bbc2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 1 Sep 2019 17:47:38 +0200 Subject: [PATCH] Failsafe home dir obtaining + When estimating $INSTALL_HOME, assure grep can only match user names, to avoid possible wrong multi-line value + Remove possible trailing slash from $INSTALL_HOME, to avoid double slash in "$INSTALL_HOME/ovpns" + Avoid "cat | grep ", since grep can process files directly + Avoid "VAR=$(cat file)", since "VAR=$( --- scripts/removeOVPN.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/removeOVPN.sh b/scripts/removeOVPN.sh index 462b25c..b2d726f 100755 --- a/scripts/removeOVPN.sh +++ b/scripts/removeOVPN.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # PiVPN: revoke client script -INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER) -PLAT=$(cat /etc/pivpn/DET_PLATFORM) +INSTALL_USER=$(