Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Uptime Manager | LINUX + WINDOWS | AUTO RESTART | BACKUPS

Comments in 'Tools' started by iamadpond, Apr 6, 2014.

  1. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    Please note this takes careful setup and know how, as even the slightest error will break the script.


    WINDOWS + LINUX
    Windows: http://bit.ly/1gt4zhE.
    (Instructions:
    1: Open start.cmd from your pocketmine installation with notepad
    2: Check to see on the last line if it contains the word "pause" If so REMOVE IT.
    3: Save the file with the file type All Files, and with the name start.bat
    4: Place the file into your pocketmine installation directory along with the file
    downloaded above (shw.bat)
    5: Run shw.bat instead of start.bat from now on and your server should run with minimal downtime! )

    Linux:
    http://bit.ly/1jV50jQ
    (Instructions:
    1: Place shw.sh in any directory you like.
    2: Configure the backup manager inside the code with "nano shw.sh" without the quotes using the instructions below. If you do not have nano please install it using

    yum install nano

    3: Once you have edited it save it using ctrl + o and then hitting enter
    4: Run shw.sh with "bash shw.sh" without the quotes
    5: Use shw.sh from now on to start your server! )



    Hello,
    Since a good few people have been asking me to create a server script to auto reboot their servers I decided to make a nice one with nice ASCII graphics for people to download,

    I called it SUM, Server Uptime Manager

    Basically you run this instead of start.sh and it "wraps" around your server with minimal configuration. It'll make sure your server stays on as much as pocketmine will allow, I've tested it with a few errors, It can handle just about any crash expect OS related crashes to the script itself but since it's so minuscule there really isn't that much room for error aside from the timer.

    (Linux Only)Now includes a backup manager! Please read the instructions inside the code to setup this feature! (Remove Paths I have in place and enter yours!) MAKE SURE YOU TYPE YOUR PATHS CORRECTLY! DAMAGE IS POSSIBLE IF YOU DO THIS INCORRECT! Unlikely though!

    How to setup backups
    # HOW TO USE BACKUP MANAGER
    #
    # 1) PLEASE CREATE A FOLDER CALLED "world-backups", without quotes in a place of your chosing.
    #
    # 2) Create on your "world-backups" directory , two folders "world-OLD" and "world-NEW" Capitals DO matter!
    #
    # 3) PLEASE FILL IN PTW, PTW IS THE PATH TO YOUR WORLD FOLDER EG: /Pocketmine-MP/worlds/world
    #
    # 4) PLEASE FILL IN PTMI, PTMI IS THE PATH TO THE FOLDER CONDTAINING YOUR POCKETMINE start.sh FILE
    #
    # 5) PLEASE FILL IN WSD, WSD IS WHERE YOU MADE YOUR "world-backups" FOLDER
    #
    # 5) Run the server once until it has finished startup, then quit it twice with the keyboard combo "ctrl+c"
    #
    # 6) Should work!

    So enough talking enjoy today!
    Smash that like button.

    http://bit.ly/1jV50jQ

    (Using bit.ly to keep a count on downloads from certain countries etc etc etc...)
    Last edited: Jul 7, 2014
  2. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    Sounds awesome!
  3. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    1.4 will contain a "/reload" command
    LDX likes this.
  4. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    Which only reloads plugins and configurations, without the need for a restart. This restarts the server in the event that it crashes. Sure use ./start.sh but who doesn't like a graphical one?
    Andrey Nazarchuk likes this.
  5. Spurs_Man321
    Offline

    Spurs_Man321 Active Member

    Joined:
    Apr 7, 2014
    Posts:
    52
    Minecraft User:
    spursman321
    What program do i start this with?(sorry new to PocketMine)
  6. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    w
    ow

    how about start this script from vps reboot for example, how do you do that? thanks :)
    Spurs_Man321 likes this.
  7. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    In your VPS or dedicated server, place this into the same folder as your pocketmine installation. And type without the quotes "bash shw.sh"
    Andrey Nazarchuk likes this.
  8. Spurs_Man321
    Offline

    Spurs_Man321 Active Member

    Joined:
    Apr 7, 2014
    Posts:
    52
    Minecraft User:
    spursman321
    thanks
  9. Spurs_Man321
    Offline

    Spurs_Man321 Active Member

    Joined:
    Apr 7, 2014
    Posts:
    52
    Minecraft User:
    spursman321
    it only opens up with notepad????
  10. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    It's only meant for a UNIX operating systems that have the bourne again shell (BASH) which is nearly everyone. Not windows, as most people use linux for the server I only wrote it in shell, bash, not batch. I might write it later on for windows.
    Andrey Nazarchuk and Pocketart like this.
  11. Spurs_Man321
    Offline

    Spurs_Man321 Active Member

    Joined:
    Apr 7, 2014
    Posts:
    52
    Minecraft User:
    spursman321
    okay thanks and why cant i send a pm i need to
  12. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    I am testing this on my main survival server. So say a plugin causes a server crash, will this script restart over and over again or does it only work once then you have to re run bash swh.sh? Please xplain a little as i want to really know more about this! Thanks
  13. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    Update: Wow this thing actually works and it works very well!!! PLEASE PLEASE PLEASE keep this updated and supported! Exactly what I need! Thanks so much @iamadpond
    iamadpond likes this.
  14. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    Thanks for your feedback!
    Andrey Nazarchuk likes this.
  15. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    No, thank you for making sure that my servers now have so much uptime, at least 99% I keep the console running 24/7 for all my servers on a netbook beside my desk. A lot of times I will wake up and one of my servers is down so I just ./start.sh This script really helps me! Keep it updated, you're awesome!
  16. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    I used a variant of this ages ago with my own servers and it worked beautifully, hardly ever down.
    tnpxxsheepdog likes this.
  17. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    Renamed
  18. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    Any changes worth downloading?
  19. iamadpond
    Offline

    iamadpond Banned

    Joined:
    Aug 24, 2013
    Posts:
    191
    Minecraft User:
    iamadpond
    Nope, hope you like it so far!
  20. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    Dude it's awesome! Been using it for a long time now and it keeps my servers at 99% uptime. Thanks so much.
    iamadpond likes this.

Share This Page

Advertisement