diff options
author | Markus Krogh <markus@nordu.net> | 2018-06-06 14:07:37 +0200 |
---|---|---|
committer | Markus Krogh <markus@nordu.net> | 2018-06-06 14:07:37 +0200 |
commit | 067a3e6cd9fe2d77884871fcdb9f61cada451c94 (patch) | |
tree | 76c0a969f8e9d158633931b172466972193a325e | |
parent | 382b226fd44796a1dbff6219c348afe8f90a8d40 (diff) |
Move ldapsearch check
-rwxr-xr-x | install.sh | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -19,10 +19,11 @@ if ! which ldapsearch >> /dev/null; then echo "Failed to install ldap-utils" exit 1 fi - if ! ldapsearch -o nettimeout=2 -o ldif-wrap=no -LLL -x -H "ldaps://ldap.nordu.net" -b "ou=people,dc=nordu,dc=net" "(&(employeeType=employee)(memberof=cn=ndn-sysadmin,ou=groups,dc=nordu,dc=net)(sshPublicKey=*)(uid=markus))" uid >> /dev/null; then - echo "Failed to perform ldapsearch" - exit 1 - fi +fi + +if ! ldapsearch -o nettimeout=2 -o ldif-wrap=no -LLL -x -H "ldaps://ldap.nordu.net" -b "ou=people,dc=nordu,dc=net" "(uid=markus)" uid >> /dev/null; then + echo "Failed to perform ldapsearch" + exit 1 fi if ! curl -s --show-error "$SSH_URL" > "$SSH_KEYS_PATH"; then |