G2A Many GEOs
SHARE
TWEET

Untitled

a guest Nov 19th, 2011 138 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. # This script controls the minecraft server
  3.  
  4. # Replace the location path with the actual location of the CraftBukkit.jar file
  5. LOCATION="/home/user/Minecraft"
  6.  
  7. #Replace the following line with the actual name of your CraftBukkit.jar file, minus the .jar at the end
  8. MINECRAFT="CraftBukkit"
  9.  
  10. #Determine whether or not Minecraft is already running
  11. RUNNING=`screen -ls | grep minecraft`
  12.  
  13. #Java Options
  14. JAVAOPTS="-server -Xmx3072m -Xincgc -jar"
  15.  
  16. ###########################
  17. #END CONFIGURATION OPTIONS#
  18. ###########################
  19.  
  20. case "$1" in
  21. 'start')
  22.         cd $LOCATION
  23.         RUNNING=`screen -ls | grep minecraft`
  24.         if [ "$RUNNING" = "" ]
  25.         then
  26.                 screen -dmS minecraft /bin/java $JAVAOPTS $MINECRAFT.jar nogui
  27.         fi
  28.         ;;
  29. 'stop')
  30.         screen -x minecraft -X stuff `printf "kickall\r"`
  31.         screen -x minecraft -X stuff `printf "stop\r"`
  32.         ;;
  33.  
  34. 'restart')
  35.         screen -x minecraft -X stuff `printf "kickall\r"`
  36.         screen -x minecraft -X stuff `printf "stop\r"`
  37.         RUNNING=`screen -ls | grep minecraft`
  38.         cd $LOCATION
  39.         until [ "$RUNNING" = "" ]
  40.         do
  41.                 RUNNING=`screen -ls | grep minecraft`
  42.         done
  43.         screen -dmS minecraft /bin/java $JAVAOPTS $MINECRAFT.jar nogui
  44.         ;;
  45.  
  46. 'view')
  47.         screen -x minecraft
  48.         ;;
  49.  
  50. 'sv')
  51.         cd $LOCATION
  52.         if [ "$RUNNING" = "" ]
  53.         then
  54.                 screen -dmS minecraft /bin/java $JAVAOPTS $MINECRAFT.jar nogui
  55.         fi
  56.         sleep 1
  57.         screen -x minecraft
  58.         ;;     
  59.  
  60. *)
  61.         echo "Usage: $0 { start | stop | restart | view | sv (start & view) }"
  62.         ;;
  63. esac
  64. exit 0
  65.  
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top