Skip to content

Commit

Permalink
Dump auth config contents (SOFTWARE-5614)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhlin committed Jul 13, 2023
1 parent fa7d1de commit 9e84557
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions stash-origin/image-config.d/40-generate-auth-file.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
#!/bin/bash -x

dump_files () {
local containing_dir
shopt -s nullglob
for f in "$containing_dir"/*; do
echo "======= $f ======="
cat "$f"
echo
done
shopt -u nullglob
}

# Generate the Authfiles and scitokens.conf file
if supervisord_is_enabled stash-origin; then
/usr/libexec/xcache/authfile-update stash-origin
[[ "$?" -ne 0 ]] && dump_files /run/stash-origin
fi
if supervisord_is_enabled stash-origin-auth ||
supervisord_is_enabled stash-origin-auth-privileged; then
/usr/libexec/xcache/authfile-update stash-origin-auth
[[ "$?" -ne 0 ]] && dump_files /run/stash-origin-auth
fi


Expand Down

0 comments on commit 9e84557

Please sign in to comment.