mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-25 12:24:26 -08:00
Added the ability to specify custom database name. Added the ability to specify custom table prefix. Created sub folders for operating systems.
9 lines
581 B
Bash
9 lines
581 B
Bash
#!/bin/bash
|
|
|
|
# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD REPLAYS SHOULD BE SAVED UNTIL (EX: SCHEDULE ONCE A WEEK TO KEEP A WEEKS WORTH OF REPLAYS IN THE DB)
|
|
|
|
DBNAME="servatrice" #set this to the database name used
|
|
TABLEPREFIX="cockatrice" #set this to the prefix used for the table names in the database (do not inclue the _)
|
|
SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file
|
|
mysql --defaults-file=$SQLCONFFILE -h localhost -e 'truncate table ""$DBNAME"".""$TABLEPREFIX""_replays;truncate table ""$DBNAME"".""$TABLEPREFIX""_replays_access'
|