Spigot minecraft server, servicize automation script
Prerequistes:
You should already have installed Minecraft Spigot server using my install script.
You must be a sudo user, ie. in the sudoers group, or the root user to install run this script.
Running as root is NOT recommended!
Installation:
If your server system: Amazon Linux/CentOS/Fedora
Excecute the commands below from your servers console
Install git on the server if not alrady on the server.
sudo dnf -y install git
Second clone this project and run the install script
git clone https://github.com/Rapitharian/MCservice_Install.git mv $HOME/MCservice_Install/MCservice.sh $HOME chmod +x MCservice.sh ./MCservice.sh 2>&1 | tee -a MCservice_Install.log
Test Installation:
Check to ensure the service started.
Assuming the service is active, connect to the active screen.
systemctl status minecraft@spigotmc 2>&1 | tee -a MCservice_Install.log screen -r
Cleanup:
Remove the installation script MCservice.sh
If you don't need the installation log, remove that as well.
rm MCservice.sh rm MCservice_Install.log
Screen usage:
To connect to the screen from a terminal type "screen -r"
To detach from a screen press "CTRL+A+D"
To list the available screens type "screen -ls"
To connect to a session type "screen -r NUMBERofTHEsession"
Sysytemctl (service control) usage:
Check Status of the minecraft server service: systemctl status minecraft@spigotmc
Start the minecraft server service: systemctl start minecraft@spigotmc
Stop the minecraft server service: systemctl stop minecraft@spigotmc
Restart the minecraft server service: systemctl restart minecraft@spigotmc