diff --git a/src/freedombone-app-vpn b/src/freedombone-app-vpn index cd1a2462..335686e5 100755 --- a/src/freedombone-app-vpn +++ b/src/freedombone-app-vpn @@ -152,6 +152,17 @@ function create_user_vpn_key { echo $"Creating VPN key for $username" cd /etc/openvpn/easy-rsa + + if [ -f /etc/openvpn/easy-rsa/keys/$username.crt ]; then + rm /etc/openvpn/easy-rsa/keys/$username.crt + fi + if [ -f /etc/openvpn/easy-rsa/keys/$username.key ]; then + rm /etc/openvpn/easy-rsa/keys/$username.key + fi + if [ -f /etc/openvpn/easy-rsa/keys/$username.csr ]; then + rm /etc/openvpn/easy-rsa/keys/$username.csr + fi + echo ' @@ -282,6 +293,17 @@ function install_vpn { exit 7392353 fi cp openssl-${vpn_openssl_version}.cnf openssl.cnf + + if [ -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.crt ]; then + rm /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.crt + fi + if [ -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.key ]; then + rm /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.key + fi + if [ -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.csr ]; then + rm /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.csr + fi + echo '