summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh4
-rw-r--r--ssh-keys.sh4
2 files changed, 8 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index dc92988..c83fb3b 100755
--- a/install.sh
+++ b/install.sh
@@ -31,6 +31,10 @@ if ! curl -s --show-error "$SSH_URL" > "$SSH_KEYS_PATH"; then
exit 1
fi
+if [ ! -f /opt/cf-repalce-ignore ]; then
+ echo "ndn-eduix nunoc" > /opt/cf-repalce-ignore
+fi
+
chmod +x "$SSH_KEYS_PATH"
if ! curl -s --show-error "$CROND_URL" > "$CROND_FILE"; then
diff --git a/ssh-keys.sh b/ssh-keys.sh
index e628bbb..aec31c0 100644
--- a/ssh-keys.sh
+++ b/ssh-keys.sh
@@ -8,6 +8,10 @@ fi
sunetEmpl="leif leifj lundberg linus per john"
ignoreList="ndn-eduix nunoc"
+if [ -f /opt/cf-repalce-ignore ]; then
+ ignoreList=$(cat /opt/cf-repalce-ignore)
+fi
+
for userHome in /home/*; do
user=$(basename "$userHome")
keys_raw=$(/usr/bin/ldapsearch -o nettimeout=5 -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=$user))" sshPublicKey)