auto start for centoo

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.
Post Reply
mateckz
Compulsive poster
Compulsive poster
Posts: 65
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Mar 10, 2010 5:20 pm

auto start for centoo

Post by mateckz »

Could anyone help me on how to auto start servers with centoo THANKS! :mrgreen:
rustydusty1717
This is my homepage
This is my homepage
Posts: 642
Joined: Sun Sep 20, 2009 6:15 pm

Re: auto start for centoo

Post by rustydusty1717 »

Gentoo or CentOS? You kind of used both in the same somehow. "centoo" :roll:
Image
sungersoo
A regular
A regular
Posts: 37
Joined: Fri Feb 26, 2010 12:05 pm

Re: auto start for centoo

Post by sungersoo »

Cant you use serverdoc?
rustydusty1717
This is my homepage
This is my homepage
Posts: 642
Joined: Sun Sep 20, 2009 6:15 pm

Re: auto start for centoo

Post by rustydusty1717 »

Serverdoc is for windows. Are you using Windows? Perhaps Gentoo or CentOS? CentOS and Gentoo both, you have to add something like the following to /etc/rc.d/rc.local.

cd /hlds
chrt -r 20 ./hlds_run -game cstrike +map de_dust2 +maxplayers 32 -pingboost 2 -autoupdate &


That will boot your server on reboot. It may take a while though. I remember on my CentOS VPS it took a while for my servers to boot up on VPS reboot.
Image
rustydusty1717
This is my homepage
This is my homepage
Posts: 642
Joined: Sun Sep 20, 2009 6:15 pm

Re: auto start for centoo

Post by rustydusty1717 »

I now run Debian, the boot config for it is in /etc/init.d/bootmisc. I know you're not on Debian, but just incase you ever run Debian, you'll know where the boot config is. Google always works wonderfully for finding ALL this info out. It's always best to learn how to fix things yourself, or atleast try to. Google is your bestfriend :wink: .
Image
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: auto start for centoo

Post by Edge100x »

In Gentoo, it would need to be set in /etc/conf.d/local.start. If you start a server in this way, I recommend using the "screen" configuration that we talk about in the guide, so that it continues on to later commands. But, if you preferred, you could use & at the end of the line to run it in the background, instead.
rustydusty1717
This is my homepage
This is my homepage
Posts: 642
Joined: Sun Sep 20, 2009 6:15 pm

Re: auto start for centoo

Post by rustydusty1717 »

Ahh, yes. If you ever think you'll want to log back into the servers terminal, use the screen command. I have never found a reason to once it's started, so I just use &. To each their own though 8)
Image
mateckz
Compulsive poster
Compulsive poster
Posts: 65
Joined: Wed Mar 10, 2010 5:20 pm

Re: auto start for centoo

Post by mateckz »

its centos SORRY how would i do it before it worked when i rcon quit it it auto restarts now it doesnt even do it now, how can i get it when i restart the box it starts and when i rcon quit it it restarts
mateckz
Compulsive poster
Compulsive poster
Posts: 65
Joined: Wed Mar 10, 2010 5:20 pm

Re: auto start for centoo

Post by mateckz »

soryr just saw the posttttt
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: auto start for centoo

Post by Edge100x »

On CentOS, you should need to add your startup line in /etc/rc.local.
mateckz
Compulsive poster
Compulsive poster
Posts: 65
Joined: Wed Mar 10, 2010 5:20 pm

Re: auto start for centoo

Post by mateckz »

how would i do that from terminal like the exact way i would put it in terminal
rustydusty1717
This is my homepage
This is my homepage
Posts: 642
Joined: Sun Sep 20, 2009 6:15 pm

Re: auto start for centoo

Post by rustydusty1717 »

Download WinSCP and connect to the VPS using SFTP. Same login as your regular one. You can edit all the files through that client.
Image
Post Reply