Added log maint script
Added log maint script
This commit is contained in:
parent
9338e7e71f
commit
ff5ea7fc1f
2 changed files with 4 additions and 0 deletions
Binary file not shown.
4
servatrice/scripts/maint_logs
Normal file
4
servatrice/scripts/maint_logs
Normal 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)'
|
Loading…
Reference in a new issue