mirror of
https://github.com/TotalFreedomMC/TF-Scripts.git
synced 2024-12-22 16:05:03 +00:00
IT LIVES
This commit is contained in:
parent
cc03139c28
commit
a9f5d3dca0
4 changed files with 13 additions and 6 deletions
7
FreeOP Servers/.my.cnf.example
Normal file
7
FreeOP Servers/.my.cnf.example
Normal file
|
@ -0,0 +1,7 @@
|
|||
[mysqldump]
|
||||
user=database-username
|
||||
password="MySuperSecurePassword!"
|
||||
|
||||
[mysql]
|
||||
user=database-username
|
||||
password="MySuperSecurePassword!"
|
|
@ -48,8 +48,11 @@ else
|
|||
then
|
||||
mysqldump -h $DB_HOSTNAME $CO_DATABASE --no-tablespaces > $CO_DATABASE-$TIMESTAMP.sql
|
||||
mv /home/tfserver/$CO_DATABASE-$TIMESTAMP.sql /home/tfserver/archives/$CO_DATABASE-$TIMESTAMP.sql
|
||||
else
|
||||
echo "Big yay, no database shite"
|
||||
echo "CoreProtect Database downloaded to /home/tfserver/archives/$CO_DATABASE-$TIMESTAMP.sql"
|
||||
echo "SET FOREIGN_KEY_CHECKS = 0;" > ./temp.sql
|
||||
mysqldump --add-drop-table --no-data --no-tablespaces -h $DB_HOSTNAME $CO_DATABASE | grep 'DROP TABLE' >> ./temp.sql
|
||||
echo "SET FOREIGN_KEY_CHECKS = 1;" >> ./temp.sql
|
||||
mysql $CO_DATABASE -h $DB_HOSTNAME < ./temp.sql
|
||||
fi
|
||||
|
||||
# Need to add something around handling the MySQL shit here
|
||||
|
@ -62,4 +65,4 @@ else
|
|||
echo "ERROR - The template: $1 you have attempted to restore, does not exist."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -15,6 +15,5 @@ else
|
|||
else
|
||||
screen -dmS $SCREEN_NAME java -Xms$JVM_HEAP -Xmx$JVM_HEAP $JVM_LAUNCH_OPTS -jar $PAPER_JAR_NAME
|
||||
echo "Server Started"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -25,10 +25,8 @@ else
|
|||
exit 1
|
||||
else
|
||||
echo "Server has been shut down succesfully."
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
echo "$SARCASTIC_MESSAGE"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
Loading…
Reference in a new issue