diff --git a/openvpn/install.sh b/openvpn/install.sh index adcb15a..97ba47c 100755 --- a/openvpn/install.sh +++ b/openvpn/install.sh @@ -119,7 +119,8 @@ do echo echo "Created directory $STARTDIR/$LOGIN with necessary files." - chown -R ${USER:=$(/usr/bin/id -run)}:$USER $STARTDIR/$LOGIN/ + USERNAME=${SUDO_USER:-$USER} + chown -R $USERNAME:$USERNAME $STARTDIR/$LOGIN/ fi