#!/bin/sh
echo "======== start clean docker containers logs ========"
logs=$(find /var/lib/docker/containers/ -name *-json.log)
for log in $logs
  do
          echo "clean logs : $log"
          cat /dev/null > $log
  done
echo "======== end clean docker containers logs ========"

echo "======= start clean rocketmq logs =========="
if [ -d /root/ea_poc/rocketmq/rmq/logs ];then
 rm -fr /root/ea_poc/rocketmq/rmq/logs/*
fi
if [ -d /root/ea_poc/rocketmq/rmq/store ]; then
 rm -fr /root/ea_poc/rocketmq/rmq/store/*
fi

if [ -d /root/ea_poc/rocketmq/rmqs/logs ];then
 rm -fr /root/ea_poc/rocketmq/rmqs/logs/*
fi
if [ -d /root/ea_poc/rocketmq/rmqs/store ]; then
 rm -fr /root/ea_poc/rocketmq/rmqs/store/*
fi

echo "======= end clean rocketmq logs =========="

