Skip to content

Commit

Permalink
fix(cleanup): remove unnecessary cleanup
Browse files Browse the repository at this point in the history
These lines don't actually do anything because there is no
`{{workingDirectory}}` set here
  • Loading branch information
mehalter committed Jul 10, 2024
1 parent d58732b commit 3540e6c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions scripts/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,6 @@ INSTANCE_LOG_FILES=(
echo "Cleaning up instance log files"
cleanup "${INSTANCE_LOG_FILES[@]}"

echo "Cleaning TOE files"
if [[ $(sudo find {{workingDirectory}}/TOE_* -type f | sudo wc -l) -gt 0 ]]; then
echo "Deleting files within {{workingDirectory}}/TOE_*"
sudo find {{workingDirectory}}/TOE_* -type f -exec shred -zuf {} \;
fi
if [[ $(sudo find {{workingDirectory}}/TOE_* -type f | sudo wc -l) -gt 0 ]]; then
echo "Failed to delete {{workingDirectory}}/TOE_*"
exit 1
fi
if [[ $(sudo find {{workingDirectory}}/TOE_* -type d | sudo wc -l) -gt 0 ]]; then
echo "Deleting {{workingDirectory}}/TOE_*"
sudo rm -rf {{workingDirectory}}/TOE_*
fi
if [[ $(sudo find {{workingDirectory}}/TOE_* -type d | sudo wc -l) -gt 0 ]]; then
echo "Failed to delete {{workingDirectory}}/TOE_*"
exit 1
fi

echo "Cleaning up ssm log files"
if sudo test -d "/var/log/amazon/ssm"; then
echo "Deleting /var/log/amazon/ssm/*"
Expand Down

0 comments on commit 3540e6c

Please sign in to comment.