Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- [ -f "$1" ] || exit 1
- mapfile -t args < "$1"
- user="${args[0]}"
- [ "${user}" != "" ] || exit 1
- pass="${args[1]}"
- [ "${pass}" != "" ] || exit 1
- file="/etc/openvpn/etc/${user}.password"
- [ -f "${file}" ] || exit 1
- save="$(<${file})"
- [ "${save}" != "" ] || exit 1
- [ "${save}" = "${pass}" ] && exit 0
- exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement