From 5e1360a65b199174268ebfd7a8178a1ea65070ff Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 7 Jan 2014 12:02:15 +0100 Subject: [PATCH] smarter log cleanup script (#533) --- .openshift/cron/daily/log-cleanup.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.openshift/cron/daily/log-cleanup.sh b/.openshift/cron/daily/log-cleanup.sh index d16a285d..ce79496f 100755 --- a/.openshift/cron/daily/log-cleanup.sh +++ b/.openshift/cron/daily/log-cleanup.sh @@ -1 +1,7 @@ -rm -rf $OPENSHIFT_JBOSSAS_LOG_DIR/*.log.* \ No newline at end of file +if [ $OPENSHIFT_JBOSSAS_LOG_DIR ]; then + rm -rf $OPENSHIFT_JBOSSAS_LOG_DIR/*.log.* +fi + +if [ $OPENSHIFT_JBOSSEAP_LOG_DIR ]; then + rm -rf $OPENSHIFT_JBOSSEAP_LOG_DIR/*.log.* +fi \ No newline at end of file