Created
August 28, 2015 20:58
-
-
Save saxbophone/e578bd93221e74939c14 to your computer and use it in GitHub Desktop.
Minecraft Server Bootstrap
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
#!/usr/bin/env bash | |
########################################################################### | |
# # | |
# MINESTRAPS - A no-shit bootstrap script for Minecraft on Amazon Linux # | |
# Written By Joshua Saxby 2015 # | |
# # | |
########################################################################### | |
# Initialise config variables | |
export MINECRAFT_USER='minecraft'; | |
export SERVER_VERSION='1.7.2'; | |
export BASE_URL='https://s3.amazonaws.com/Minecraft.Download/versions'; | |
export FULL_URL="${BASE_URL}/${SERVER_VERSION}/minecraft_server.${SERVER_VERSION}.jar"; | |
echo $FULL_URL; | |
# First Update System Packages (assumes yes to any questions asked) | |
sudo yum update -y; | |
# Create the minecraft system user | |
sudo adduser $MINECRAFT_USER; | |
# Rest of the commands get run as the newly created minecraft user | |
sudo su $MINECRAFT_USER << EOF | |
# Go to home directory | |
cd; | |
# Download the desired minecraft version | |
wget $FULL_URL; | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment