Advertisement
Guest User

Untitled

a guest
Sep 7th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #!/bin/bash
  2. [ -f "$1" ] || exit 1
  3. mapfile -t args < "$1"
  4. user="${args[0]}"
  5. [ "${user}" != "" ] || exit 1
  6. pass="${args[1]}"
  7. [ "${pass}" != "" ] || exit 1
  8. file="/etc/openvpn/etc/${user}.password"
  9. [ -f "${file}" ] || exit 1
  10. save="$(<${file})"
  11. [ "${save}" != "" ] || exit 1
  12. [ "${save}" = "${pass}" ] && exit 0
  13. exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement