diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index a92bc7b..48a25ee 100755 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -241,6 +241,8 @@ echo "tls-auth Private Key found: $TA" # Copy the .ovpn profile to the home directory for convenient remote access cp "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" "/home/$INSTALL_USER/ovpns/$NAME$FILEEXT" chown "$INSTALL_USER" "/home/$INSTALL_USER/ovpns/$NAME$FILEEXT" +chmod o-r "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" +chmod o-r "/home/$INSTALL_USER/ovpns/$NAME$FILEEXT" printf "\n\n" printf "========================================================\n" printf "\e[1mDone! %s successfully created!\e[0m \n" "$NAME$FILEEXT" diff --git a/scripts/removeOVPN.sh b/scripts/removeOVPN.sh index 6bf0610..4438d98 100644 --- a/scripts/removeOVPN.sh +++ b/scripts/removeOVPN.sh @@ -114,6 +114,7 @@ for (( ii = 0; ii < ${#CERTS_TO_REVOKE[@]}; ii++)); do rm -rf "pki/private/${CERTS_TO_REVOKE[ii]}.key" rm -rf "pki/issued/${CERTS_TO_REVOKE[ii]}.crt" rm -rf "/home/${INSTALL_USER}/ovpns/${CERTS_TO_REVOKE[ii]}.ovpn" + rm -rf "/etc/openvpn/easy-rsa/pki/${CERTS_TO_REVOKE[ii]}.ovpn" cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem done printf "::: Completed!\n"