Skip to content

Commit

Permalink
stability fixes in runGRIDContainerized.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Mar 6, 2024
1 parent 52c6168 commit 9700860
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GRID/utils/runGRIDContainerized.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo "Trying to run script ${SCRIPT} in a container environment"

# detect architecture (ARM or X86)
ARCH=$(uname -i)
if [ "$ARCH" == "aarch64" ] || [ "$arch" == "x86" ]; then
if [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "x86_64" ]; then
echo "Detected hardware architecture : $ARCH"
else
echo "Invalid architecture ${ARCH} detected. Exiting"
Expand All @@ -35,9 +35,9 @@ fi
# copy script to WORK_DIR
cp ${SCRIPT} ${WORK_DIR}/job.sh

# export certificates (need to be created before)
ALIEN_CERTFILE=$(ls -t /tmp/tokencert_*.pem 2> /dev/null | head -n 1)
ALIEN_KEYFILE=$(ls -t /tmp/tokenkey_*.pem 2> /dev/null | head -n 1)
# export certificates - belonging to current user (need to be created before)
ALIEN_CERTFILE=$(find /tmp -type f -name 'tokencert*pem' -user `whoami` 2> /dev/null)
ALIEN_KEYFILE=$(find /tmp -type f -name 'tokenkey*pem' -user `whoami` 2> /dev/null)

[ "${ALIEN_CERTFILE}" == "" ] && echo "No certificate file found; Initialize a token with alien-init-token or similar" && exit 1
[ "${ALIEN_KEYFILE}" == "" ] && echo "No certificate file found; Initialize a token with alien-init-token or similar" && exit 1
Expand Down

0 comments on commit 9700860

Please sign in to comment.