mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-12 07:40:30 -08:00
Added log maint script
Added log maint script
This commit is contained in:
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)'
|
||||
Reference in New Issue
Block a user