diff --git a/openvpn-install.sh b/openvpn-install.sh index 8b56327..0c78e50 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -42,13 +42,13 @@ newclient () { cat /etc/openvpn/easy-rsa/pki/ca.crt >> ~/$1.ovpn echo "" >> ~/$1.ovpn echo "" >> ~/$1.ovpn - cat /etc/openvpn/easy-rsa/pki/issued/$1.crt >> ~/$1.ovpn + sed -ne '/BEGIN CERTIFICATE/,$ p' /etc/openvpn/easy-rsa/pki/issued/$1.crt >> ~/$1.ovpn echo "" >> ~/$1.ovpn echo "" >> ~/$1.ovpn cat /etc/openvpn/easy-rsa/pki/private/$1.key >> ~/$1.ovpn echo "" >> ~/$1.ovpn echo "" >> ~/$1.ovpn - cat /etc/openvpn/ta.key >> ~/$1.ovpn + sed -ne '/BEGIN OpenVPN Static key/,$ p' /etc/openvpn/ta.key >> ~/$1.ovpn echo "" >> ~/$1.ovpn }