Skip to content

Instantly share code, notes, and snippets.

@divyavanmahajan
Created March 15, 2016 02:44
Show Gist options
  • Save divyavanmahajan/460177e92c5c55ba7f49 to your computer and use it in GitHub Desktop.
Save divyavanmahajan/460177e92c5c55ba7f49 to your computer and use it in GitHub Desktop.
Turnkey OpenVPN - generate URLs to download the OVPN files for all users.
#!/bin/bash -e
rm -rf /var/www/openvpn/htdocs/profiles/[0-9a-f]*
ls /etc/openvpn/easy-rsa/keys/*ovpn|xargs -n 1 -I FNAME basename FNAME .ovpn|grep -v proxy|xargs -n 1 -I CNAME ./create_user.sh CNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment