mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
12 lines
330 B
Bash
Executable File
12 lines
330 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cn=`awk -F= '/[Ss]ubject[:=]/ {
|
|
gsub(" ", "_") ; print "vpn " $NF }' \
|
|
/etc/openvpn/client.crt 2> /dev/null`
|
|
|
|
test "$cn" || cn=`awk -F= '/[Ss]ubject[:=]/ {
|
|
gsub(" ", "_") ; print "wiauth " $NF }' \
|
|
/etc/wiauthclt/user.crt.pem 2> /dev/null`
|
|
|
|
echo "cn=$cn"
|