Einzelnen Beitrag anzeigen
Alt 13.02.2012, 18:36   #23
Donzi.UTzone
Der oberste Chaf
 
Benutzerbild von Donzi
 
Registriert seit: 13.11.2009
Ort: Wiesbaden
Alter: 48
Beiträge: 8.719
Beigetretene Cups: 10
Cup Siege: 2
Downloads: 1398
Uploads: 2697
Donzi eine Nachricht über ICQ schicken
Standard

Screen ist Pflicht, sonst gehts nicht.


Gleichzeitig 2 Fliegen, eine Klappe, den GC jagt die ini´s in einen "Portname"-Ordner.

Code:
#	Settings
SERVICE='craftbukkit-1.1.jar'
OPTIONS='nogui'
XMS=$1
XMX=$2
IP=$3
PORT=$4
PIDFILE=port"$4".pid

#	Serverstartline
INVOCATION="java $XMS $XMX -jar $SERVICE $OPTIONS $IP $PORT"

#	PID from GC-Screen to pidfile
ps -ef | grep SCREEN | grep $IP | grep $PORT | grep -v grep | awk ' { print $2 }' > $PIDFILE

#	copy mc-server to port-destination-folder
cp -f $SERVICE port$PORT/

#	change director to port-destination-folder
cd port$PORT/

#	Start mc-Server with all settings
$INVOCATION
__________________
•• Alle Letsplays: https://wiki.Donzi.tv
• Discord: https://chat.Donzi.tv
• Twitch: https://Donzi.TV
• Youtube: https://Donzi.YT
• Twitter: https://Donzi.tv/twitter
• Steam: https://Donzi.tv/steam


• Mein Liebling: https://UTzone.de
• Twitter: https://twitter.com/UTzone
• Games kaufen: https://UTzone.de/shop/games
Donzi ist offline   Mit Zitat antworten