Created
May 9, 2017 07:16
-
-
Save raghur/25fa6a46a2ba041447dca4413aa5b01d to your computer and use it in GitHub Desktop.
Generate ovpn file using .crt and .key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export OVPN_CLIENT=$1 | |
| perl -pe 's#;cert;#open+F,"$ENV{'OVPN_CLIENT'}.crt";join"",<F>#ge' client.conf.template > $1.ovpn | |
| perl -pe 's#;key;#open+F,"$ENV{'OVPN_CLIENT'}.key";join"",<F>#ge' -i $1.ovpn | |
| export OVPN_CLIENT= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment