wok diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openvpn/stuff/usr/bin/conf2ovpn Mon Apr 06 06:26:59 2020 +0100 1.3 @@ -0,0 +1,11 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +[ "$1" ] && echo "usage: $0 < file.conf > file.ovpn" && exit 1 1.7 +awk '{ if ($1 == "ca" || $1 == "cert" || $1 == "key" || $1 == "extra-certs" || 1.8 + $1 == "secret" || $1 == "pkcs12" || $1 == "http-proxy-user-pass" || 1.9 + $1 == "crl-verify" || $1 == "tls-auth" || $1 == "tls-crypt" || 1.10 + $1 == "dh") f[$1]=$2; else print 1.11 +} END { print "key-direction 1 # for tls-auth, please check\n"; for (i in f) { 1.12 + print "<" i ">"; system("cat " f[i]); print "</" i ">\n" 1.13 + } 1.14 +}'