mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-21 16:29:04 +01:00
Fix home dir detection
Fix e965518dc7
Fix https://github.com/angristan/openvpn-install/issues/806
This commit is contained in:
parent
e965518dc7
commit
319459ae77
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user