Skip to content

Commit

Permalink
Fix home dir detection
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan authored and timbo2k committed Dec 25, 2021
1 parent 69d2b76 commit 3ed34fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn-install.sh
Expand Up @@ -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
Expand Down

0 comments on commit 3ed34fd

Please sign in to comment.