From 319459ae770666e5d989d57ecdf84c2c8d7c9aac Mon Sep 17 00:00:00 2001 From: Stanislas Lange Date: Thu, 11 Mar 2021 18:59:45 +0100 Subject: [PATCH] Fix home dir detection Fix e965518dc7df1a1363be674455bb798b28727851 Fix https://github.com/angristan/openvpn-install/issues/806 --- openvpn-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 2bcf579..efa92ed 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -1085,9 +1085,9 @@ function newClient() { fi # Home directory of the user, where the client configuration will be written - if [ -e "/home/${CLIENT_NAME}" ]; then + if [ -e "/home/${CLIENT}" ]; then # if $1 is a user name - homeDir="/home/${CLIENT_NAME}" + homeDir="/home/${CLIENT}" elif [ "${SUDO_USER}" ]; then # if not, use SUDO_USER if [ "${SUDO_USER}" == "root" ]; then