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
父節點 e965518dc7
當前提交 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