Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dholt committed Jun 1, 2021
1 parent 0727623 commit 60d1bb0
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/usr/bin/env bash
set -ex

if [ "$SLURM_JOB_USER" != root ]; then
if [[ -n "$SLURM_JOB_USER" && "$SLURM_JOB_USER" != "root" ]]; then
logger -s -t slurm-epilog 'Removed residual user files'
for dir in /tmp /dev/shm ; do
find "${dir}" -user "${SLURM_JOB_USER}" -exec rm -rf {} \;
find "${dir}" -user "${SLURM_JOB_USER}" -print0 | xargs -0 -r rm -fr ||:
done
fi

exit 0

0 comments on commit 60d1bb0

Please sign in to comment.