22 lines
338 B
Bash
Executable File
22 lines
338 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#
|
|
# Initialize the EasyRSA PKI
|
|
#
|
|
|
|
if [ "$DEBUG" == "1" ]; then
|
|
set -x
|
|
else
|
|
exec 2> /dev/null
|
|
fi
|
|
|
|
set -e
|
|
|
|
# Ensure folders exist
|
|
mkdir -p $OPENVPN/pki/reqs $OPENVPN/pki/issued $OPENVPN/pki/certs_by_serial $OPENVPN/otp $OPENVPN/ccd
|
|
|
|
# Finally generate server cert
|
|
cat << EOF | easyrsa build-server-full "$1" nopass
|
|
yes
|
|
EOF
|