Skip to content

Instantly share code, notes, and snippets.

@brianclogan
Created February 3, 2018 04:16
Show Gist options
  • Save brianclogan/e2e6513d5748cc7944c5ca2c25fbc8f7 to your computer and use it in GitHub Desktop.
Save brianclogan/e2e6513d5748cc7944c5ca2c25fbc8f7 to your computer and use it in GitHub Desktop.
Bungeecord Installation
#!/bin/bash
####
# Bungeecord Installer
####
# Install Requried Packages
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install -y oracle-java7-installer whois
java -version
sleep 3
# Create a user
sudo useradd mc
PASSWORD=$(mkpasswd)
sudo usermod --password $PASSWORD mc
# Make the directories
sudo mkdir /home/mc/
sudo mkdir /home/mc/bungee-server
sudo cd /home/mc/bungee-server
# Download Bungeecord
wget https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar
cat > start.sh << EOF
#!/bin/sh
java -Xms1024M -Xmx1024M -jar BungeeCord.jar
EOF
sudo cat > /etc/systemd/system/bungee.service << EOF
# Bungeecord Worker File
# ----------------------------------
# File should be placed in:
# /etc/systemd/system
[Unit]
Description=Bungeecord Worker
[Service]
User=mc
Group=mc
Restart=on-failure
ExecStart=./home/mc/bungee-server/start.sh
[Install]
WantedBy=multi-user.target
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment