Skip to content

Commit

Permalink
Clean up tmp directory when finished.
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jul 24, 2017
1 parent d1b9151 commit 4f6dd48
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,14 @@ kill "$config_system_pid" 1>/dev/null 2>&1
# Make sure the cursor is back (if spinners misbehaved)
tput cnorm

# Cleanup the tmp files
if [ "$tempdir" != "" ] && [ "$tempdir" != "/" ]; then
log_info "Cleaning up temporary files in $tmpdir."
find "$tempdir" -delete
else
log_error "Could not safely clean up temporary files because TMPDIR set to $tempdir."
fi

if [ ! -z "$QUOTA_FAILED" ]; then
log_warning "Quotas were not configurable. A reboot may be required. Or, if this is"
log_warning "a VM, configuration may be required at the host level."
Expand Down

0 comments on commit 4f6dd48

Please sign in to comment.