Skip to content

Instantly share code, notes, and snippets.

@kadekjayak
Last active July 13, 2020 13:21
Show Gist options
  • Select an option

  • Save kadekjayak/269ea23d1d0cbb82e0aba2379f1c066f to your computer and use it in GitHub Desktop.

Select an option

Save kadekjayak/269ea23d1d0cbb82e0aba2379f1c066f to your computer and use it in GitHub Desktop.
openvpn auth scripts using rest api
#!/bin/bash
user_id=`php /etc/openvpn/server/script/auth.php $username $password`
## Check user
[ "$user_id" != '' ] && echo "user : $username" && echo 'authentication ok.' && exit 0 || echo "authentication failed. $username"; exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment