Skip to content

Commit

Permalink
cleanup-log-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
riya-17 committed Sep 25, 2019
1 parent e89fe49 commit ad85986
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion server/bin/pbench-sync-satellite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,20 @@ if [ -s ${state_change_log} ] ;then
fi
fi

if [[ ${nerrs} == 0 ]] ; then
list=$(find $logdir_for_remote -path '*' -printf '%P\n')

for files in $list; do
files=$logdir_for_remote/$files
echo $files >> file
done < file

while read -r file; do
rm -rf $file
done < file
> file
fi

let end_time=$(timestamp-seconds-since-epoch)
let duration=end_time-start_time
echo "$TS: end - $(timestamp)" | tee -a $mail_content
Expand All @@ -281,4 +295,4 @@ EOF
cat $mail_content >> $index_content
pbench-report-status --name ${PROG} --pid ${$} --timestamp $(timestamp) --type status ${index_content}

exit 0
exit 0

0 comments on commit ad85986

Please sign in to comment.