#!/bin/bash

if [[ -z $1 ]];
then
	echo "Usage: gen_profile <client_name>"
else

	export CLIENTNAME=$1
	docker-compose run --rm openvpn easyrsa build-client-full $CLIENTNAME
	docker-compose run --rm openvpn ovpn_getclient $CLIENTNAME > $CLIENTNAME.ovpn
fi
