Added log maint script

Added log maint script
This commit is contained in:
woogerboy21 2015-07-11 17:03:37 -04:00
parent 9338e7e71f
commit ff5ea7fc1f
2 changed files with 4 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1,4 @@
#!/bin/bash
#SCHEDULE WITH CRONTAB AND ADJUST THE INTERVALS FOR THE NUMBER OF DAYS OF LOGS TO KEEP IN THE DATABASE
SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file
mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_log where log_time < DATE_SUB(now(), INTERVAL 10 DAY)'