wok rev 23176

openvpn: add conf2opvn (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 18 11:14:38 2020 +0100 (2020-03-18)
parents e9bee322d73c
children 5af8e6bf64b2
files openvpn/receipt openvpn/stuff/usr/bin/conf2opvn
line diff
     1.1 --- a/openvpn/receipt	Wed Mar 18 11:06:48 2020 +0100
     1.2 +++ b/openvpn/receipt	Wed Mar 18 11:14:38 2020 +0100
     1.3 @@ -36,7 +36,7 @@
     1.4  	mkdir -p $fs/usr/sbin
     1.5  
     1.6  	cp -a $install/usr/sbin/openvpn	$fs/usr/sbin
     1.7 -	cp -a $stuff/etc		$fs
     1.8 +	cp -a $stuff/*			$fs
     1.9  
    1.10  	chown root.root $fs/etc/init.d/*
    1.11  	chmod 0644 $fs/etc/openvpn/openvpn.conf
     2.1 --- a/openvpn/stuff/usr/bin/conf2opvn	Wed Mar 18 11:06:48 2020 +0100
     2.2 +++ b/openvpn/stuff/usr/bin/conf2opvn	Wed Mar 18 11:14:38 2020 +0100
     2.3 @@ -5,7 +5,7 @@
     2.4  	    $1 == "secret" || $1 == "pkcs12" || $1 == "http-proxy-user-pass" ||
     2.5  	    $1 == "crl-verify" || $1 == "tls-auth" || $1 == "tls-crypt" ||
     2.6  	    $1 == "dh") f[$1]=$2; else print
     2.7 -} END { print "key-direction 1\n"; for (i in f) {
     2.8 +} END { print "key-direction 1	# for tls-auth, need check\n"; for (i in f) {
     2.9  		print "<" i ">"; system("cat " f[i]); print "</" i ">\n"
    2.10  	}
    2.11  }'