From 067a3e6cd9fe2d77884871fcdb9f61cada451c94 Mon Sep 17 00:00:00 2001 From: Markus Krogh Date: Wed, 6 Jun 2018 14:07:37 +0200 Subject: Move ldapsearch check --- install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index d7c3308..b1f937f 100755 --- a/install.sh +++ b/install.sh @@ -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 -- cgit v1.1