2021-10-05 17:09:29 +02:00
|
|
|
#!/usr/bin/env bash
|
2020-05-15 01:13:33 +02:00
|
|
|
|
2021-02-26 14:11:13 +02:00
|
|
|
mkdir -p {easyrsa,ccd}
|
2020-05-15 01:13:33 +02:00
|
|
|
|
|
|
|
cd easyrsa
|
|
|
|
|
|
|
|
if [ ! -f easyrsa ]; then
|
2020-10-15 18:12:31 +02:00
|
|
|
curl -sL https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.8/EasyRSA-3.0.8.tgz | tar -xzv --strip-components=1 -C .
|
2020-05-15 01:13:33 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d pki ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
./easyrsa init-pki
|
2020-11-17 19:48:26 +02:00
|
|
|
echo "ca" | ./easyrsa build-ca nopass
|
2020-05-15 01:13:33 +02:00
|
|
|
./easyrsa build-server-full server nopass
|
|
|
|
./easyrsa build-client-full client nopass
|