What is this?
This is a complete package that will manage multiple server daemons, provide an easy to use web interface, and provide a python based scripting API. It is designed for unix-like systems so it can easily work on Mac OS, Linux, or FreeBSD. It might work on Windows too assuming you have all of the dependencies for each module you want to use. It is modular so you do not have to use all three parts (although the web interface requires the daemon manager).
The Daemon Manager
The base of this project is the multi-server daemon manager. I designed it out of frustration with the inability to run multiple servers reliably and easily. This remedies that and manages the separate processes almost flawlessly.
Features:
- - Restarts a server if it crashes
- Saving a log, error log, and script error log
- PID file locking
- Will remove lock file if the process no longer exists (useful in case of system power failure)
- Kill unresponsive server/script
- Full support for scripting
- Clears error log on startup
The web interface was prompted by LOVER$BOY, but at first, I only gave him a very simplistic interface with only a start/stop buttons and a command box. No log, no settings, and no status. I decided to make a better version and attach it to my daemon management tool.
Features:
- - User management
- Start/Stop/Restart/Reload buttons
- Command box to send commands to the server
- Reversed log that updates every half second
- Log supports fancy characters
- Changing settings_custom.cfg
- Changing script.py (with a documented scripting API)
- Script error log
- Full syntax highlighting for the settings and script
- - Support for IE versions below IE9
- Making the editor highlight color coded portions with their color
The scripting API was designed because, again, I was frustrated with the difficulty and flakiness of tailing ladderlog into a PHP script and tailing the output into the Armagetron program. This remedies that by providing a nice easy to use interface to the ladderlog and chat commands in an easy to use language. It is documented at http://arma.fkmclane.tk/api.html.
Features:
- - Support for adding multiple callbacks to a single ladderlog command
- Support for special characters
- Support for chat command handlers
- Keeps track of and provides a nice interface to:- - Current round
- The number of players
- All of the players and their name, IP address and score and whether they are alive or dead
- All of the teams and their name, score, players, and player positions
- All of the zones and various features about them
- - Current round
Daemon Manager:
- sh (bash, dash, or anything compatible with the bourne shell)
coreutils (GNU coreutils, busybox, etc.)
daemonize
- Daemon Manager (above)
PHP
- Python
Could you please report it on GitHub?
Where can I get this?
You can see a live demo at http://arma.fkmclane.tk/. It shows off the web interface and the simplicity of the scripting API with a simple script to reset the settings when everyone leaves. Simply login with these credentials:
- Username: demo
Password: demo
Note: The scripting API and daemon manager can be used independently of each other, but the web interface depends on the daemon manager to work. The web interface is also geared toward using the scripting API, but can be easily changed to support (and highlight!) any generic script.
Note: Despite what GitHub thinks, this project is NOT a majority of JavaScript. That number comes from the codemirror syntax highlighting that is packaged with it.
Can I sell servers with this?
Sure, it is under the MIT license after all. You can make changes to the code, redistribute it, rebrand it, and do whatever you want, you just need to keep my copyright notice. I don't care if you sell your own servers with this. Odds are you have better computers than the single one I am hosting with.
I can't host my own server, but I like the interface. Can you host a server for me?
Yes, I will soon be selling servers with access to this web interface for probably just $2-3 a month. It won't be top of the line hosting, but a few extra dollars a month would be nice and these servers would fund further development of this framework. I could easily host probably 20 servers without any noticeable lag, but I will not accept more than that at first. If there is enough demand, I will probably use the money I make from this to buy another server dedicated to Armagetron. This server would probably have 2GB of RAM and host up to 50 servers (Servers usually take anywhere from 5-20MB).