Skip to content

Instantly share code, notes, and snippets.

@linuxboytoo
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save linuxboytoo/f14b4a54500e549c9001 to your computer and use it in GitHub Desktop.

Select an option

Save linuxboytoo/f14b4a54500e549c9001 to your computer and use it in GitHub Desktop.
Deploy Script for PocketMine on AWS
#!/bin/bash
apt-get update
apt-get -y install libgomp1 default-jre python-pip
echo "Installing AWS CLI..."
pip install awscli
export AWS_DEFAULT_REGION=us-east-1
aws ec2 associate-address --instance-id `curl http://169.254.169.254/latest/meta-data/instance-id` --public-ip 54.197.243.168
aws ec2 attach-volume --volume-id vol-dcb93a90 --instance-id `curl http://169.254.169.254/latest/meta-data/instance-id` --device /dev/sdm
sleep 5
mkdir -p /data
mount /dev/xvdm /data
sleep 10
echo "Starting Pocketmine..."
screen -dmS pocketmine "/data/pocketmine/pocketmine/start.sh"
echo "Starting Bukkit..."
screen -dmS bukkit "/data/bukkit/craftbukkit.sh"
aws sns publish --topic-arn arn:aws:sns:us-east-1:270120338941:MinecraftServer --message "Server Started"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment