I’m quite unsure if this is the correct topic but I guess Admins / Mods will just move it, if its the wrong one.
For my hobbys and job I got myself a small dedicated Server on which I could run some GServers. I would give you FTP Acess to it so you can setup everything thats required.
I will offer that service to anyone who has a CUSTOM Server on which not everything is just copied from elsewhere (You know what I mean.) If you interested or got any questions, feel free to ask. I do this cus I want to support this community. I loved Graal and quit because everything went wrong and since I can’t help coding or something, I hope this helps atleast.
My Service is totaly free and will stay online as long as possible. Atleast a year I guess…
If someone does something like a CGI / PHP Script to Run / Stop / Restart the Graalserver I would be happy to offer that within my service…
Gllt and I have been playing with this for a while now, I have a php interface with login authentication that will stop a gserver based on userid. Im in the middle of implementing fast server config, the web interface is half written. I still need to implement some serious validation before someone dumps something nasty into it. Still playing with linux quotas and my development machine is in shambles atm. Ive never had so much trouble with Grub. It hates me.
I did lots of things that never went anywhere or were related to what I was supposed to be doing.
But I have halfop status on IRC and I’m a spammer here.
Ive read your topic but still wanted to offer this. Once someoen with PHP knowledge helps me, it will be done asap.
I need a simple PHP page which does the following:
Has a statustext which says :RUNNING: or :OFFLINE: somwhere on it and has 3 Buttons.
1 Button -> Start
2 Button -> Restart
3 Button -> Shutdown
The Infos about RUNNING or OFFLINE will be supplied by me, so simply make a text. My Programm will change that text dynamically.
The 1 Button must do the following:
- Write in the file: (same dir as PHP file) serveract.txt a new line with ‘runs’
- Is only available if button 2 & 3 are not available. Disables itself once clicked.
The 2 Button must do:
- Write in the file: (same dir as PHP file) serveract.txt a new line with ‘ress’
- Is available if 1 is not (Since server must be running to restart) and 3 is available. Disables all Buttons once pressed.
- Write in the file: (same dir as PHP file) serveract.txt a new line with ‘shus’
- Is available if Button 1 is disabled and button 2 is enabled. Disables all Buttons once pressed.
Easiest would be you create 3 PHP files and I simply use the required one… Hope someone can help…
I have almost all of these features at the moment, although my code needs to be rewritten into objects. You’ve forgotten authentication- you don’t want to leave the on off switch to somebodys gserver public on the internet.
Mine works like this:
Login -> checks the mysql database
Returns session arrays for server and user data (also stored in mysql)
My pagination runs on post variables, ie. /?manage=motd (which later ill tidy up to /manage/motd)
Gservers are stored in /opt/gsrv/$userid/ (im running linux)
I have apache running as a restricted user (no login, very limited access, still probbably going to get bashed for being insecure)
server config is currently stored in mysql, when there is an update it is updated in mysql and then dumped into the config files (still working on this)
I still need to implement some serious validation and tighten the whole thing.
I would avoid individual php files, you need one solid object with escaping and validation on the input. As far as running under windows, it should be similar but I believe you will need to modify the exec commands. Mine executes a small bash script (work around as you need to change directory to the gserver root before executing it or it wont find the config files)
No need for a login part on the PHP crap. My crap will be httpaccess secured. Guess thats enough :> Everything r protected and also like no access but that PHP ^^
What are you trying to achieve with this PHP interface? This is to allow your users to restart their servers through the internet, correct?
Since I dont want to give them access to run an exe file or even any kind of login, its the most secure way for me.