#!/bin/bash
DAYS=$1
[[ -z "$DAYS" ]] && DAYS=3
cd /mnt/lvmdisk/.onething_data/ && find . -name "*video*" -mtime $DAYS |xargs rm -rf {}
sleep 10
docker stop $(docker ps | grep ks | awk '{print $1}')
[ -f "/etc/baidu-xcdn-flag" ] && systemctl restart xagent
sh /xyapp/system/miner.plugin-agent.ipk/stop.sh
sleep 2
sh /xyapp/system/miner.plugin-agent.ipk/start.sh
