summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2016-10-08 16:09:59 +0000
committerHolger Levsen <holger@layer-acht.org>2016-10-08 20:23:51 +0200
commit321b68cf7639c584ed5a200b831da21e2af131e9 (patch)
tree0af3528b8697873cfc58eead2ffe2445b88c35cc
parent6cce5be1f7b80a8cb2a29cf17ba13ea9f9f63698 (diff)
downloadjenkins.debian.net-321b68cf7639c584ed5a200b831da21e2af131e9.tar.xz
update_jdn: deploy the users also when only a ssh key changes
this makes possible to add/remove/edit a ssh key and have it deployed also when $UP2DATE is otherwise true. Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xupdate_jdn.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 6be6b2a8..f090317d 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -85,7 +85,7 @@ u_shell['jenkins-adm']='/bin/bash'
# get the users out of the user_host_groups array's index
users=$(for i in ${!user_host_groups[@]}; do echo ${i%,*} ; done | sort -u)
-$UP2DATE || for user in ${users}; do
+( $UP2DATE && [ -z $(find authorized_keys -newer $0) ] ) || for user in ${users}; do
# -v is a bashism to check for set variables, used here to see if this user is active on this host
[ -v user_host_groups["$user","$HOSTNAME"] -o -v user_host_groups["$user",'*'] ] || continue