Hur får man till så minecraft servern startars upp när Raspberry:n bootar upp ?
Tjo,
Nu har jag nog provat 7 olika tips på nätet om hur man gör för att minecraft servern skall startas automatiskt när raspberry:n startar men min minecraft server startar inte.
Detta har jag provat:
Edit the crontab
crontab -e
Paste this line at the end
@reboot /home/pi/minecraft/server/start.sh
----
We are going to create a convenient script to start the server. Type nano minecraft.sh and write the following four lines of code:
if ! screen -list | grep -q "minecraft"; then
cd /home/pi/minecraft
screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot-1.16.1.jar nogui
fi
chmod +x minecraft.sh
We want the server to start automatically when the Raspberry Pi reboots, so type sudo nano /etc/rc.local and enter su -l pi -c /home/pi/minecraft/minecraft.sh right before the exit command.
----
if ! screen -list | grep -q "minecraft"; then
cd /home/pi/minecraft
screen -S minecraft -d -m java -Xms512M -Xmx2600M -jar spigot-1.15.2.jar nogui
fi
sudo nano /etc/rc.local
Right before the last line 'exit 0' add the following command, save and exit the file. This will allow the minecraft server to start in a detached screen session when the Pi boots up.
screen -dm -S minecraft /home/pi/startup/minecraft.sh
----
Men inget av detta funkar, servern startar inte upp när man startar igång raspberry:n
Någon som vet eller har nya förslag på vad man kan göra ?
/Force