1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Automatic update for Pocketmine on OSX

Discussion in 'General discussion' started by karld, Jun 17, 2017.

  1. karld

    karld Spider

    Messages:
    8
    I created this simple script a little while ago for my personal use to keep my Pocketmine server updated, which is configured to run on an automatic frequency on my Mac server.

    https://bitbucket.org/karldurrance/updatepocketmine

    Here is what it does:

    1. Check if anyone is online on my server (via mcstatus tool - pip install mcstatus), if no players are online, then proceed to check for updates (Don't want to kick my kids off for an update)
    2. Query the Jenkins server for the latest build version via the JSON API
    3. If the current installed build is older than latest Jenkins build, then stop Pocketmine (Launchctl unload), download latest build from Jenkins and then restart Pocketmine (Launchctl load)
    4. Send a Growl notification (via growlnotify - http://growl.info/downloads) summarising the change, so I can keep track of when updates are installed and what they were for

    Not sure if this would be handy for anyone else, or if there is a better way of doing this? It certainly reduces the admin effort for me to keep my kid's Pocketmine server up to date.
     
    HimbeersaftLP and Thunder33345 like this.
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    PocketMine has a built in auto-updating system. Why should this be used instead?
     
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    because pocketmine build in auto updating system was a lie, it's a UPDATE NOTIFIER, not a updater (yet...)
     
    jasonwynn10 and HimbeersaftLP like this.
  4. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Fair enough. Too bad Windows doesn't have an auto updater :oops:
     
  5. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    i think it's possible to hack it in using bash if any one want to bother trying
    (hint get/dependOn the unix utilities ports like wget/curl etc)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.