Start/Stop/Restart Script that allows users to perform actio

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
hybrid82
A semi-regular
A semi-regular
Posts: 15
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Jun 23, 2014 8:22 am

Start/Stop/Restart Script that allows users to perform actio

Post by hybrid82 »

Greetings everyone,

First time poster here so please bare with me.

Is there anyone out there in this community that can help me in regards to creating and setting up a script and/or program that allows my game server admins to connect to my main server (VPS) via FTP and perform these actions (Start/Stop/Restart) for individual game servers?

I know it can be done, but I do not know how to accomplish this and I haven't been able to find anything over the net in regards to this. I contacted the NFO staff via a support ticket, but they directed me here to post and ask this to see if any community members can shed some light on how to accomplish this.

Essentially, I have 13 Halo: Combat Evolved game servers running on my main 2-core (VPS) server. I, of course, am able to login to this VPS server and manually stop each game server and restart it - but I would like to expand this to some admins I have that do not have direct access to my 2-core VPS. They do however, have access to some folders via FTP to change details (init files) for the halo game servers BUT are unable to stop/start/restart the game servers since nothing is there to perform those such actions via FTP.

And I do not want my admins of these game servers to have access to my 2-core VPS, only via FTP and only the folders I assign to them. So with that being said, is there a way to script this for each individual game server that allows my admins to connect via FTP and simply click a file that stops the game server and perhaps click another file that will start/restart it?

Kind Regards,
Hybrid
User avatar
rymax99
This is my homepage
This is my homepage
Posts: 143
Joined: Sun Feb 02, 2014 2:08 pm
Location: Florida
Contact:

Re: Start/Stop/Restart Script that allows users to perform a

Post by rymax99 »

hybrid82 wrote:Greetings everyone,

First time poster here so please bare with me.

Is there anyone out there in this community that can help me in regards to creating and setting up a script and/or program that allows my game server admins to connect to my main server (VPS) via FTP and perform these actions (Start/Stop/Restart) for individual game servers?

I know it can be done, but I do not know how to accomplish this and I haven't been able to find anything over the net in regards to this. I contacted the NFO staff via a support ticket, but they directed me here to post and ask this to see if any community members can shed some light on how to accomplish this.

Essentially, I have 13 Halo: Combat Evolved game servers running on my main 2-core (VPS) server. I, of course, am able to login to this VPS server and manually stop each game server and restart it - but I would like to expand this to some admins I have that do not have direct access to my 2-core VPS. They do however, have access to some folders via FTP to change details (init files) for the halo game servers BUT are unable to stop/start/restart the game servers since nothing is there to perform those such actions via FTP.

And I do not want my admins of these game servers to have access to my 2-core VPS, only via FTP and only the folders I assign to them. So with that being said, is there a way to script this for each individual game server that allows my admins to connect via FTP and simply click a file that stops the game server and perhaps click another file that will start/restart it?

Kind Regards,
Hybrid
If I understand it correctly, you have 12 game servers running on your VDS and you would like to give some of your administrators access to specific ones so they can restart/stop, etc., correct? Is this a Linux or Windows machine? You cannot run scripts via FTP, FTP would only allow users to administrate the files. The easiest way would be to create separate users for the game servers and only give administrators access to the specific account.
hybrid82
A semi-regular
A semi-regular
Posts: 15
Joined: Mon Jun 23, 2014 8:22 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by hybrid82 »

I am running a Windows 2003 VPS.

So how would I go about doing this if I am unable to do it via FTP?
QOOOOOOOOQ
A regular
A regular
Posts: 35
Joined: Wed Nov 20, 2013 11:50 pm

Re: Start/Stop/Restart Script that allows users to perform a

Post by QOOOOOOOOQ »

hybrid82 wrote:I am running a Windows 2003 VPS.

So how would I go about doing this if I am unable to do it via FTP?
Easy, create (or better, if someone else already has one created) a script that restarts the server executable when it stops, then the servers always stay online. If a server needs to be restarted, an admin can type 'rcon quit' in console, which should trigger a stop, which would then trigger an automatic restart on that gameserver on the VDS. Simple yes?
hybrid82
A semi-regular
A semi-regular
Posts: 15
Joined: Mon Jun 23, 2014 8:22 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by hybrid82 »

That doesn't really help...

Where would this script be written and placed on the VPS?

What would be on this script, I mean I understand that a script is needed to execute/perform the action to stop/start a game server, but have no idea how to write one up and/or even where to start...

In my original post, I mentioned that I currently run 13 Halo:Combat Evolved game servers (each have their own folder and shortcut .exe...Would this script need to be placed in each game server folder?

And how would I be able to allow specific admins to control select game servers if they do not have accounts on my VPS? Which is why I asked if this was possible via FTP as I have accounts setup via FTP for them - but apparently this wouldn't work via FTP which draws me back to square 1...

I can safely assume this script would need to be placed in each game server folder - so a total of 13 scripts would be required yes? If this is the case, what would the script look like and how would I create it? And once created, how do I go about setting up accounts for my admins so they have this ability?
User avatar
TacTicToe
This is my homepage
This is my homepage
Posts: 848
Joined: Fri Feb 18, 2011 1:08 pm
Location: USA
Contact:

Re: Start/Stop/Restart Script that allows users to perform a

Post by TacTicToe »

http://gamecp.com/

https://www.nehox.com/

http://www.brainless.us/

Found these after about 30 seconds with Google.

If you dont mind paying for it, FireDaemon is excellent tool. I use it to run our servers. You can install a web interface that will allow them to start/stop the server. FireDaemon will restart a crashed server.

http://www.firedaemon.com/
hybrid82
A semi-regular
A semi-regular
Posts: 15
Joined: Mon Jun 23, 2014 8:22 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by hybrid82 »

So how would these products work? I can't afford to pay for them so if any of them have a free basic package - I can do that...but would all I need to do is upload the product to my VPS?

How would my admins have access to it if they do not have access to my VPS - they only have access via FTP to select folders?
$atanic $pirit
This is my homepage
This is my homepage
Posts: 251
Joined: Tue Jan 28, 2014 5:32 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by $atanic $pirit »

What TacTicToe was referring to was web based control panel for your game servers. They are basically websites that allow you to control servers. You can start stop servers from it, and you can monitor them as some have console feature built in them. Those web panels can have separate accounts to access separate areas of panel.
For example:

You have 3 admins named A, B and C and 4 servers. Lets call servers 1,2,3 and 4

You can set it like admin A can access server 1 and 3. Admin B can access 2 and admin C can control 4.
What amazes me is that you are running 12 servers on 2 core VPS. That doesn't seem right to me, even if game was released in 2001, 12 is too high for 2 core. Do you feel lag at all in servers?
Image
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by .=QUACK=.Major.Pain »

As mentioned, http://www.brainless.us/

Free version should work fine for you.
You would have to have unmanaged VDS so it can be installed.

If you ever decide to go with the licensed version, it's only $25 per server per year.
Pretty cheap.

He's currently working on integrating an auto installed system.

If you need help, he's quick to reply on his forum.
He's very active there.

The easiest installation is EZUGCC download.
Download it on your VDS, and run it.
Change the port on the next window to whatever you want.
I have used 8080 or 8090 with no issues.
Once it's installed, you just go on your pc and go to ip:port and the control panel will open up.
I think default login is admin/admin but you will get a pop up notepad page after installation on the VDS that shows you your info.
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
hybrid82
A semi-regular
A semi-regular
Posts: 15
Joined: Mon Jun 23, 2014 8:22 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by hybrid82 »

$atanic $pirit wrote: What amazes me is that you are running 12 servers on 2 core VPS. That doesn't seem right to me, even if game was released in 2001, 12 is too high for 2 core. Do you feel lag at all in servers?
Not at all, Halo (believe it or not) takes up very little space to run it. If we wanted to (and we did test this out) we could run up to 20 game servers with no problems at all (with very little lag included) - but we scaled back to only keeping 13 running for the time being since we plan on opening up a few other game servers (minecraft - x1 or x2) - However, we do know minecraft game servers are resource heavy so if (or rather when) we open them up, we will need to monitor and make sure our Halo game servers are doing just fine - if not - we will have to close a few of the Halo game servers down or add more memory/RAM (either or).

But thank you for making a post to this topic - I figured that's how it would work (admin A controls the specific game server we allow them too - in this case servers 1 & 3, and same goes for the other admins, etc...). I just didn't know if this was something we upload to our main VPS or not and if so, how to get everything setup to allow our admins access to it. If this is web based - wouldn't that mean I'd need to obtain a website and then get this product uploaded to our site?
$atanic $pirit
This is my homepage
This is my homepage
Posts: 251
Joined: Tue Jan 28, 2014 5:32 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by $atanic $pirit »

It's good to know that you can run, so many servers on small box. Did you ever ran out of RAM or any other resource at any point? I'm just curious to know and would appreciate, if you can provide some figures.

As for cpanel, well yes. You need a web server to make it work, but you don't need to buy a separate web hosting plan. You are on unmanaged server, so you can try to run XAMP stack on it and it should do.
Image
hybrid82
A semi-regular
A semi-regular
Posts: 15
Joined: Mon Jun 23, 2014 8:22 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by hybrid82 »

$atanic $pirit wrote:It's good to know that you can run, so many servers on small box. Did you ever ran out of RAM or any other resource at any point? I'm just curious to know and would appreciate, if you can provide some figures.

As for cpanel, well yes. You need a web server to make it work, but you don't need to buy a separate web hosting plan. You are on unmanaged server, so you can try to run XAMP stack on it and it should do.
To answer your question, CPU usage on a given day ranges from 10%-30% (and that's with at least 10 out of those 13 game servers full (16players in each)).

Our 2-core specs:
4000GB of bandwidth
3072MB of Memory space
200GB of standard hard-drive space

The highest bandwidth usage so far that we've used in the past 11 months barely exceeded over 978GB. Not bad considering that we are using atm only about 25% of our resources.

And if I may, what is XAMP stack?
User avatar
rymax99
This is my homepage
This is my homepage
Posts: 143
Joined: Sun Feb 02, 2014 2:08 pm
Location: Florida
Contact:

Re: Start/Stop/Restart Script that allows users to perform a

Post by rymax99 »

hybrid82 wrote:
$atanic $pirit wrote:It's good to know that you can run, so many servers on small box. Did you ever ran out of RAM or any other resource at any point? I'm just curious to know and would appreciate, if you can provide some figures.

As for cpanel, well yes. You need a web server to make it work, but you don't need to buy a separate web hosting plan. You are on unmanaged server, so you can try to run XAMP stack on it and it should do.
To answer your question, CPU usage on a given day ranges from 10%-30% (and that's with at least 10 out of those 13 game servers full (16players in each)).

Our 2-core specs:
4000GB of bandwidth
3072MB of Memory space
200GB of standard hard-drive space

The highest bandwidth usage so far that we've used in the past 11 months barely exceeded over 978GB. Not bad considering that we are using atm only about 25% of our resources.

And if I may, what is XAMP stack?
XAMPP is a binary containing Apache, PHP, MySQL, and phpMyAdmin. (https://www.apachefriends.org/index.html)

You can run it locally, but I'd honestly either get a shared NFO web hosting plan or setup a LAMP stack on a single core Linux only VDS (LAMP standing for Linux, Apache, MySQL, phpMyAdmin). Web servers run better on Linux and by adding one to your game server you add a huge attack surface, and if your web server goes under high load, you will definitely notice a performance degrade.
hybrid82
A semi-regular
A semi-regular
Posts: 15
Joined: Mon Jun 23, 2014 8:22 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by hybrid82 »

rymax99 wrote: XAMPP is a binary containing Apache, PHP, MySQL, and phpMyAdmin. (https://www.apachefriends.org/index.html)

You can run it locally, but I'd honestly either get a shared NFO web hosting plan or setup a LAMP stack on a single core Linux only VDS (LAMP standing for Linux, Apache, MySQL, phpMyAdmin). Web servers run better on Linux and by adding one to your game server you add a huge attack surface, and if your web server goes under high load, you will definitely notice a performance degrade.
Dually noted. I actually have a website VPS via a different hosting company (justhost.com) - with that being said, would I even need XAMP or LAMP?

Overall, I have my VPS via NFO which is strictly for my game servers & then my website VPS through justhost.com for everything site related...That way if my game servers get attacked - only my game servers go down and not my website and/or vice versa.

If I don't need XAMP or LAMP, then would all I need to do is upload 1 of those free basic products to my website and then get things setup admin wise?

And I apologize for asking so many questions, but if you have used any of those products before, does it use an API call to reference the game servers IP:Port? (Hopefully that makes sense).
$atanic $pirit
This is my homepage
This is my homepage
Posts: 251
Joined: Tue Jan 28, 2014 5:32 am

Re: Start/Stop/Restart Script that allows users to perform a

Post by $atanic $pirit »

All questions are welcomed here. After all this is a discussion board and we all try to help each other by sharing knowledge.

You just need to upload files and create a mysql database for it. I have used a few and most of them do need mysql database support. Find the install instructions from the developers and get it set up.

Now, the way it connects depends on panel. I have used like 2 of those on Linux in past, but soon I realized that I don't need them. They usually connect via user account and then execute the command. You enter IP, username and password for it to connect. Similar fashion to how you connect remote sql access.
Image
Post Reply