Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- [[ -x easyrsa ]] || sudo apt install easy-rsa || exit 1
- chmod +x easyrsa gen-ovpn.sh
- if [[ -e pki/issued/$1.crt ]]; then
- echo "Reusing existing keys for $1. To regenerate: './easyrsa renew $1' or delete them manually"
- else
- _20_YEARS=7300
- ./easyrsa --days=$_20_YEARS build-client-full "$@" || exit 1
- fi
- scp pki/issued/$1.crt ams:/etc/openvpn/server/clients
- scp pki/issued/$1.crt vds:/etc/openvpn/server/clients
- # ./gen-ovpn.sh "$1"
Advertisement
Add Comment
Please, Sign In to add comment