1
1
mirror of https://github.com/namibia/openvpn-install.git synced 2024-12-22 23:08:55 +00:00

Fix home dir detection

Fix e965518dc7
Fix https://github.com/angristan/openvpn-install/issues/806
This commit is contained in:
Stanislas Lange 2021-03-11 18:59:45 +01:00
parent e965518dc7
commit 319459ae77
No known key found for this signature in database
GPG Key ID: 710D9597C7EAD8CF

View File

@ -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