Skip to content
Snippets Groups Projects

BUGFIX: Change ownership to executing USER and group to atlab. Also automatically gzip the log output

1 file
+ 8
3
Compare changes
  • Side-by-side
  • Inline
@@ -127,11 +127,16 @@ if [[ -z "${dry_run}" ]]; then
@@ -127,11 +127,16 @@ if [[ -z "${dry_run}" ]]; then
# run policy command
# run policy command
$cmd
$cmd
 
log_name="${output_log_prefix}_${filetag}"
 
log_dir="${outdir}/${log_name}.d"
 
 
mkdir ${log_dir}
 
# tag output file with run metadata
# tag output file with run metadata
outfile=`ls -t $tmpglobal | head -1`
raw_log_file=$(find ${outdir} -name "list-${SLURM_JOBID}*" -type d | head -1)
if [[ "$outfile" != "" ]]
if [[ "$raw_log_file" != "" ]]
then
then
mv -n $tmpglobal/$outfile $tmpglobal/../${output_log_prefix}_$filetag
mv -n ${raw_log_file} ${log_dir}/${log_name}
fi
fi
rmdir $tmpglobal
rmdir $tmpglobal
fi
fi
 
\ No newline at end of file
Loading