Raised This Month: $ Target: $400
 0% 

Make ./hlds_run start on system boot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Afternova
Junior Member
Join Date: Sep 2015
Location: Riga, Latvia
Old 09-19-2015 , 23:39   Make ./hlds_run start on system boot
Reply With Quote #1

Hello guys,

I have installed fresh and working CS 1.6 server (finally working).

When i enter this command in terminal:
Code:
./hlds_run -console -game cstrike -ip 46.101.137.123 -port 27015 +maxplayers 32 +map de_dust2 &
my server is started and i can play the game .. but when i close terminal then server shuts down.

How to run ./hlds_run in background and on system boot?

Thank you very much!
Afternova is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: Belarus
Old 09-20-2015 , 01:57   Re: Make ./hlds_run start on system boot
Reply With Quote #2

You should use "screen". For example:
Quote:
screen ./hlds_run
Press CTRL+A+D for detach screen (leave it, but screen will be working background).
Use "screen -r" for resume to screen (to HLDS console).

About autorun when system starts, I think "/etc/init.d".

And better to make server on which OS, which you know better ;).

Last edited by Phant; 09-20-2015 at 01:59.
Phant is offline
Send a message via ICQ to Phant
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 09-20-2015 , 02:08   Re: Make ./hlds_run start on system boot
Reply With Quote #3

You have to set a name for the screen, otherwise it won't work
Code:
screen server1 ./hlds_run
But he want's to run it with server boot or restart.
Google knows how to run a program as service, i suggest you to use it.
__________________

Mordekay is offline
Afternova
Junior Member
Join Date: Sep 2015
Location: Riga, Latvia
Old 09-20-2015 , 03:30   Re: Make ./hlds_run start on system boot
Reply With Quote #4

Ohh, amazing, thank you very much guys, works perfect!
Now i need to found and understand how to run it with server boot/restart
Afternova is offline
Amroth
Senior Member
Join Date: Apr 2013
Location: /root
Old 09-20-2015 , 05:15   Re: Make ./hlds_run start on system boot
Reply With Quote #5

I think /etc/rc.local would tick.
Amroth is offline
Afternova
Junior Member
Join Date: Sep 2015
Location: Riga, Latvia
Old 09-20-2015 , 07:23   Re: Make ./hlds_run start on system boot
Reply With Quote #6

Thanks Amroth, i will try!
Afternova is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:52.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode