bootstrap.sh 380 B

12345678910111213141516171819
  1. #!/bin/bash
  2. mkdir -p {easyrsa,ccd}
  3. cd easyrsa
  4. if [ ! -f easyrsa ]; then
  5. curl -sL https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.8/EasyRSA-3.0.8.tgz | tar -xzv --strip-components=1 -C .
  6. fi
  7. if [ -d pki ]; then
  8. exit 0
  9. fi
  10. ./easyrsa init-pki
  11. echo "ca" | ./easyrsa build-ca nopass
  12. ./easyrsa build-server-full server nopass
  13. ./easyrsa build-client-full client nopass