This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +calebjones is my openname (Bitcoin username). https://onename.com/calebjones |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dateStr="`date +"%Y%m%d%H%M"`" | |
fileNamePrefix="name-of-backup" | |
tarFileName="${fileNamePrefix}-${dateStr}.tgz" | |
#echo "tarFileName: ${tarFileName}" | |
cd "/Users/USERNAME/Library/Application Support/minecraft" | |
lastBackupFile=`ls -rt | grep $fileNamePrefix | awk 'NR==0; END{print}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: minecraft | |
# Required-Start: $local_fs $remote_fs screen-cleanup | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Minecraft server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# backup location with daily files | |
# format: .*_[DATE]_.* | |
# date format: YYYY-MM-DD | |
backupLocation="/path/to/backups" | |
if [ -z "$backupLocation" ]; then | |
echo 'Must set $backupLocation' | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minute Hour Day of Month Month Day of Week Command | |
# (0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat) | |
# backup server every day at 4am | |
0 4 * * * /home/minecraft/minecraft/bin/minecraft backup | |
# clean daily backups (keep daily last 7 days, weekly for last 30 days, then once a month) | |
30 4 * * * /home/minecraft/clean-daily-backups.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A script to update an RSS feed when player events happen in minecraft server log. | |
# Integrate with IFTTT or other RSS reader tools to get live alerts. | |
# For now, just monitors player join/leave events. | |
# Only keeps last 10 entries in RSS file (rotating out oldest ones). | |
# Requires: xmlstarlet, perl, uuidgen, and other typical Linux commands. | |
# Does not manage pid file. | |
# Cron example (run daily as user specific to this process - not as user who otherwise runs tail) |