aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ak-clean7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ak-clean b/bin/ak-clean
index f69071c..2411190 100755
--- a/bin/ak-clean
+++ b/bin/ak-clean
@@ -21,6 +21,13 @@ descriptionString="Cleans ak temp files"
source $AK_LIBDIR/_ak_script
_ak_tmp_cleanup(){
+ ls -1 /tmp/aktmp* > /dev/null 2>&1
+ if [ $? -ne 0 ]
+ then
+ _ak_log_info "No tmp items found for deletion"
+ exit 0
+ fi
+ _ak_log_info "Cleaning up $(ls -1 /tmp/aktmp* | wc -l) items"
rm -rf /tmp/aktmp*
}