Update makeOVPN.sh

Fixed ownership line to use only username, not install path.
This commit is contained in:
Douglas Orend 2019-08-20 09:02:31 -05:00
parent 8b40035bf5
commit 44e1f48856

View file

@ -271,7 +271,7 @@ echo "tls-auth Private Key found: $TA"
# Copy the .ovpn profile to the home directory for convenient remote access # Copy the .ovpn profile to the home directory for convenient remote access
INSTALL_HOME=$(cat /etc/passwd | grep "$INSTALL_USER" | cut -d: -f6) INSTALL_HOME=$(cat /etc/passwd | grep "$INSTALL_USER" | cut -d: -f6)
cp "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" "$INSTALL_HOME/ovpns/$NAME$FILEEXT" cp "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" "$INSTALL_HOME/ovpns/$NAME$FILEEXT"
chown "$INSTALL_HOME" "$INSTALL_HOME/ovpns/$NAME$FILEEXT" chown "$INSTALL_USER" "$INSTALL_HOME/ovpns/$NAME$FILEEXT"
chmod o-r "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" chmod o-r "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT"
chmod o-r "$INSTALL_HOME/ovpns/$NAME$FILEEXT" chmod o-r "$INSTALL_HOME/ovpns/$NAME$FILEEXT"
printf "\n\n" printf "\n\n"