wok view openvpn/stuff/usr/bin/conf2ovpn @ rev 23492

python-bcrypt: added build dependencies
author Hans-G?nter Theisgen
date Mon Apr 06 06:26:59 2020 +0100 (2020-04-06)
parents
children
line source
1 #!/bin/sh
3 [ "$1" ] && echo "usage: $0 < file.conf > file.ovpn" && exit 1
4 awk '{ if ($1 == "ca" || $1 == "cert" || $1 == "key" || $1 == "extra-certs" ||
5 $1 == "secret" || $1 == "pkcs12" || $1 == "http-proxy-user-pass" ||
6 $1 == "crl-verify" || $1 == "tls-auth" || $1 == "tls-crypt" ||
7 $1 == "dh") f[$1]=$2; else print
8 } END { print "key-direction 1 # for tls-auth, please check\n"; for (i in f) {
9 print "<" i ">"; system("cat " f[i]); print "</" i ">\n"
10 }
11 }'