Last active
July 13, 2020 13:21
-
-
Save kadekjayak/269ea23d1d0cbb82e0aba2379f1c066f to your computer and use it in GitHub Desktop.
openvpn auth scripts using rest api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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