Einzelnen Beitrag anzeigen
Alt 10.02.2012, 14:39   #10
Donzi.UTzone
Der oberste Chaf
 
Benutzerbild von Donzi
 
Registriert seit: 13.11.2009
Ort: Wiesbaden
Alter: 45
Beiträge: 8.628
Beigetretene Cups: 10
Cup Siege: 2
Downloads: 1327
Uploads: 2696
Donzi eine Nachricht über ICQ schicken
Standard

Code:
ps -ef | grep -v grep | grep 'SCREEN -m -D -A -S Minecraft Server' | grep 25565 |awk ' { print $2 }' > $PIDFILE
Launching process: /home/donzi/GameCreate-5212/minecraft/minecraft_launch.x86 25565 -Xms512M -Xmx1024M from directory /home/donzi/GameCreate-5212/minecraft
Fri Feb 10 15:33:58 2012: Received PING request
Fri Feb 10 15:34:01 2012: Process 3252 was confirmed by master
Fri Feb 10 15:34:13 2012: ** Stop GameCreate Booking: ID 9711366 **
Fri Feb 10 15:34:13 2012: Could not open pid-file /home/donzi/GameCreate-5212/minecraft/port25565.pid
-----------

eine alternative wäre
Code:
screen -list | grep "Minecraft Server" | awk '{ print $1 }' | awk -v 'FS=.' '{print $1}'  > $PIDFILE
Fri Feb 10 15:35:32 2012: Launching process: /home/donzi/GameCreate-5212/minecraft/minecraft_launch.x86 25565 -Xms512M -Xmx1024M from directory /home/donzi/GameCreate-5212/minecraft
Fri Feb 10 15:35:35 2012: Process 3599 was confirmed by master
Fri Feb 10 15:35:35 2012: Sending PONG, waiting for response
Fri Feb 10 15:35:38 2012: Received PONG response
Fri Feb 10 15:35:50 2012: ** Stop GameCreate Booking: ID 9711366 **
Fri Feb 10 15:35:50 2012: Could not open pid-file /home/donzi/GameCreate-5212/minecraft/port25565.pid

----------
wenn das nicht funzt biite ausgabe von
Code:
ps -ef | grep SCREEN
posten

Code:
donzi@babe2676:~/GameCreate-5212/minecraft$ ps -ef | grep SCREEN
donzi     3781  2121  0 15:37 ?        00:00:00 /usr/bin/SCREEN -m -D -A -S "Minecraft Server" /home/donzi/GameCreate-5212/minecraft/minecraft_launch.x86 25565 -Xms512M -Xmx1024M
donzi     3833  3071  0 15:37 pts/1    00:00:00 grep SCREEN
donzi@babe2676:~/GameCreate-5212/minecraft$
minecraft_launch.x86
Code:
java $2 $3 -jar craftbukkit-1.1.jar nogui $1
sleep2
#ps -ef | grep SCREEN | grep 'SCREEN -m -D -A -S "Minecraft Server"' | grep $1 | grep -v grep | awk ' { print $2 }' > port"$1".pid
#ps -ef | grep -v grep | grep 'SCREEN -m -D -A -S Minecraft Server' | grep $1 |awk ' { print $2 }' > port"$1".pid
screen -list | grep "Minecraft Server" | awk '{ print $1 }' | awk -v 'FS=.' '{print $1}'  > port"$1".pid
fi
__________________
•• Alle Letsplays: https://Donzi.wiki
• Discord: https://Donzi.Chat
• Twitch: https://Donzi.TV
• Youtube: https://Donzi.YT
• Twitter: https://Donzi.wiki/twitter
• Facebook: https://Donzi.wiki/facebook
• Steam: https://Donzi.wiki/steam


• Mein Liebling: https://UTzone.de
• Twitter: https://twitter.com/UTzone
• Facebook: https://fb.me/UTzone.de
• Games kaufen: https://UTzone.de/shop/games


Donzi ist offline   Mit Zitat antworten