Giter VIP home page Giter VIP logo

server-autostart's Introduction

Server Autostarter

Server Autostarter is a BASH (Bourne Again Shell) script which helps you organize and ease your servers, launching everything you need all in one. You need one dependency (which you might already have.)

  • screen

How to install screen?

It's pretty easy:

$ sudo apt-get install screen | (ubuntu/debian)
$ yum -y install screen | (centos/fedora)

How to install/edit the script itself?

You can install the script by typing on your terminal -

$ git clone https://github.com/brxnter/server-autostart.git | (make sure to download it on an easy accessible path, such as /home/)

Or you can just download it by going to Releases and selecting the newest version available.

So, you will need to edit some things on the script itself, which are:

  • srv_dir - path of where the server is located at
  • srv_name - will be needed to monitor if the screen instance has started by typing screen -ls on the terminal or console.
  • srv_mem - this will be used only if your server requires memory allocation sizes (can be kept uncommented if not needed.)

The rest of the script can be edited if you're running a network of servers, such as Minecraft Networks with Bungee, etc, etc. To do this, you'll need to add these lines of code onto the appropriate blocks, such as start), stop), restart), info). Starting with start), if you need to add a new server to the network, it will be firstly added to srv_dir, adding a screen name to srv_name, and adding the memory allocation size at srv_mem.

on the start) block:

  • cd $srv_dir && screen -AmdS $srv_name (adding the server arguments which you'd type without screen.)

on the stop) block:

  • screen -XS $srv_name -p 0 quit

on the restart) block:

  • screen -XS $srv_name -p 0 quit
  • cd $srv_dir && screen -AmdS $srv_name (copy args from line 34)

License

This project is lincensed under MIT License.

server-autostart's People

Contributors

hendrix1337 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.