I need to convert this windows bat code, to linux code

Discussion in 'Bukkit Help' started by Gladius_Crafter, Aug 30, 2012.

Thread Status:
Not open for further replies.
  1. Offline


    Hey guys I am making a hunger games server, but I need this windows batch file to be changed into a linux file.

    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx1024M -Xms1024M -jar
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    java -Xincgc -Xmx1G -jar craftbukkit.jar
    rmdir /s /q "\world\"
    goto start

    thanks :)
  2. Offline


  3. Offline


    Just go to the folder which The craftbukkit.jar is at in terminal and type
    java -jar craftbukkit.jar
    That SHOULD work, if not go through the link that Omnitv posted above ^^

    Let me know if you need more help
  4. Offline


    That script is for my hunger games server, I need it , java -jar craftbukkit.jar only starts the server. I need that exact script for linux.. I need help fast guys.
  5. Offline


    There is this really neat invention called google that has all sorts of information on how to do stuff. You should try it sometime.
    Omnitv likes this.
  6. Offline


    Theres something called asking if you have tried searching it instead of being a douchebag. I have tried searching it, and I cannot find it -_-
  7. Offline


    Not being a douchebag, here is the first result for "shell script"

  8. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

    So you need a script that starts the server and on shutdown deletes the world dir?
  9. Offline


    Yes :)
  10. Offline


    while true;
        java -Xincgc -Xmx1G -jar craftbukkit.jar;
        sleep 5;
        rm -rf world/
        echo 'server will reboot in 20 seconds! Press CTRL-C to stop the reboot, and kill the script!'
        sleep 20; 
    This script will also reboot the server upon stop!
    run the script in a screen! upon issueing STOP, the server will stop, the world folder will be removed, and you will be given 20 seconds (easily changed), to stop the server from running!
Thread Status:
Not open for further replies.

Share This Page