<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Noname yet &#187; steam</title>
	<atom:link href="http://dcsk.org.ua/tag/steam/feed/" rel="self" type="application/rss+xml" />
	<link>http://dcsk.org.ua</link>
	<description></description>
	<lastBuildDate>Thu, 18 Feb 2010 22:00:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Настройка Counter-strike сервера под debian(ubuntu)</title>
		<link>http://dcsk.org.ua/2009/08/nastrojka-counter-strike-servera-pod-debianubuntu/</link>
		<comments>http://dcsk.org.ua/2009/08/nastrojka-counter-strike-servera-pod-debianubuntu/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 09:56:41 +0000</pubDate>
		<dc:creator>dcsk</dc:creator>
				<category><![CDATA[Игровые сервера]]></category>
		<category><![CDATA[Counter-Strike]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hlds]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[steam]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[игры]]></category>
		<category><![CDATA[сервера]]></category>

		<guid isPermaLink="false">http://dcsk.org.ua/?p=44</guid>
		<description><![CDATA[Данная статья является универсальным руководством для любого дистрибутива linux, но писался для debian, потому могут быть разного рода особенности.
Итак, установка и настройка Counter-Strike сервера на linux на примере debian/ubuntu.
Установим необходимые в дальнейшем пакеты:
#apt-get install gdb gawk screen
Скачивание сервера Counter-strike с steam
Первым делом создадим пользователя и авторизуемся как он:
123$sudo adduser cs
#sudo su cs
$cd ~
Скачаем и запустим [...]]]></description>
			<content:encoded><![CDATA[<p>Данная статья является универсальным руководством для любого дистрибутива linux, но писался для debian, потому могут быть разного рода особенности.</p>
<p>Итак, установка и настройка Counter-Strike сервера на linux на примере debian/ubuntu.</p>
<h3><span id="more-44"></span>Установим необходимые в дальнейшем пакеты:</h3>
<p>#apt-get install gdb gawk screen</p>
<h3>Скачивание сервера Counter-strike с steam</h3>
<p>Первым делом создадим пользователя и авторизуемся как он:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">$sudo</span> adduser cs<br />
<span style="color: #666666; font-style: italic;">#sudo su cs</span><br />
<span style="color: #007800;">$cd</span> ~</div></td></tr></tbody></table></div>
<p>Скачаем и запустим hldsupdatetool:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">$wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>storefront.steampowered.com<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>hldsupdatetool.bin<br />
<span style="color: #007800;">$chmod</span> +x hldsupdatetool.bin</div></td></tr></tbody></table></div>
<p>Вводим yes, что соглашаемся с правилами и обовляем саму утилиту скачивания:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Enter <span style="color: #ff0000;">'yes'</span> to accept this agreement, <span style="color: #ff0000;">'no'</span> to decline: <span style="color: #c20cb9; font-weight: bold;">yes</span><br />
extracting steam.tar.Z...done<br />
$ .<span style="color: #000000; font-weight: bold;">/</span>steam<br />
Checking bootstrapper version ...<br />
Getting version 34 of Steam HLDS Update Tool<br />
Downloading. . . . . . . . . . .<br />
Steam Linux Client updated, please retry the <span style="color: #7a0874; font-weight: bold;">command</span></div></td></tr></tbody></table></div>
<p>Итак, теперь можно узнать опции запуска:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$.<span style="color: #000000; font-weight: bold;">/</span>steam<br />
Checking bootstrapper version ...<br />
<br />
Use: steam <span style="color: #660033;">-command</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #7a0874; font-weight: bold;">command</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #7a0874; font-weight: bold;">&#91;</span>parameters<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>flags<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<br />
Commands:<br />
<br />
update: Install or update HLDS<br />
<br />
parameters:<br />
<span style="color: #660033;">-game</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;game<span style="color: #000000; font-weight: bold;">&amp;</span>gt;            -   Game name: use <span style="color: #ff0000;">'list'</span> to see available games<br />
<span style="color: #660033;">-dir</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;installdir<span style="color: #000000; font-weight: bold;">&amp;</span>gt;       -   HLDS Install <span style="color: #c20cb9; font-weight: bold;">dir</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #c20cb9; font-weight: bold;">dir</span> not specified, will use value from <span style="color: #c20cb9; font-weight: bold;">last</span> run of tool<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
flags:<br />
-verify_all             -   Verify all HLDS files are up to <span style="color: #c20cb9; font-weight: bold;">date</span><br />
-retry                  -   Automatically retry every 30 seconds <span style="color: #000000; font-weight: bold;">if</span> the Steam Network is busy<br />
-remember_password      -   Remember password <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> a username is supplied<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
For example: steam <span style="color: #660033;">-command</span> update <span style="color: #660033;">-game</span> cstrike <span style="color: #660033;">-dir</span> <span style="color: #000000; font-weight: bold;">/</span>hlds<br />
<br />
version: View installed versions<br />
<br />
list: View available games<br />
<br />
Optional parameters <span style="color: #000000; font-weight: bold;">for</span> all commands:<br />
<br />
<span style="color: #660033;">-username</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;username<span style="color: #000000; font-weight: bold;">&amp;</span>gt;    -   Steam account username <span style="color: #7a0874; font-weight: bold;">&#40;</span>only needed to access limited content<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #660033;">-password</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;password<span style="color: #000000; font-weight: bold;">&amp;</span>gt;    -   Steam account password <span style="color: #7a0874; font-weight: bold;">&#40;</span>only needed to access limited content<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></td></tr></tbody></table></div>
<p>Так как нужен cs сервер в папке hlds_cs, то мы ее создадим и запустим загрузку:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">$mkdir</span> hlds_cs<br />
$.<span style="color: #000000; font-weight: bold;">/</span>steam <span style="color: #660033;">-command</span> update <span style="color: #660033;">-game</span> cstrike <span style="color: #660033;">-dir</span> .<span style="color: #000000; font-weight: bold;">/</span>hlds_cs</div></td></tr></tbody></table></div>
<h3>Создание скриптов запуска и автоматизация запуска</h3>
<p>Для создания скрипта запуска надо открыть своим любимым редактором файл /etc/init.d/cs (либо с любым другим названием) с правами суперпользователя и вставить туда такой код:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br />132<br />133<br />134<br />135<br />136<br />137<br />138<br />139<br />140<br />141<br />142<br />143<br />144<br />145<br />146<br />147<br />148<br />149<br />150<br />151<br />152<br />153<br />154<br />155<br />156<br />157<br />158<br />159<br />160<br />161<br />162<br />163<br />164<br />165<br />166<br />167<br />168<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#! /bin/bash</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Start the Counter-Strike dedicated server.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># AUTHORS :</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Julien Escario ( pandemik@azilog.net )</span><br />
<span style="color: #666666; font-style: italic;"># &amp;amp;</span><br />
<span style="color: #666666; font-style: italic;"># Cedric Rochat ( crochat@younics.org )</span><br />
<span style="color: #666666; font-style: italic;"># &amp;amp;</span><br />
<span style="color: #666666; font-style: italic;"># Cmdr._Firewalker ( cmdr._firewalker@web.de )</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># ===========================================</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># What you need:</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Linux :)</span><br />
<span style="color: #666666; font-style: italic;"># awk</span><br />
<span style="color: #666666; font-style: italic;"># screen</span><br />
<span style="color: #666666; font-style: italic;"># the hlds_l &amp;amp; cstrike files (obtainable via steam)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># How to use:</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Edit the CS_USER-Var to the user running your cs-servers</span><br />
<span style="color: #666666; font-style: italic;"># Edit the DIR-Var to fit your system (just contains the path to the dir that contains hlds_run)</span><br />
<span style="color: #666666; font-style: italic;"># Edit the PARAMS-Var to fit your needs</span><br />
<span style="color: #666666; font-style: italic;"># - standard is startup as internet server</span><br />
<span style="color: #666666; font-style: italic;"># if you use multiple scripts on one system you should change the NAME-var (otherwise</span><br />
<span style="color: #666666; font-style: italic;"># &nbsp; all will be stopped if you run the script with &quot;stop&quot;, and status will be useless)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># When this is done, copy the file to /etc/rc.d/init.d (or whereever your system stores the</span><br />
<span style="color: #666666; font-style: italic;"># scripts for starting the services) and set the execute permission.</span><br />
<span style="color: #666666; font-style: italic;"># Now you can link the script to your runlevel-dir, here's an example for runlevel 3:</span><br />
<span style="color: #666666; font-style: italic;"># ln -s /etc/rc.d/init.d/hlds /etc/rc.d/rc3.d/S90hlds</span><br />
<span style="color: #666666; font-style: italic;"># ln -s /etc/rc.d/init.d/hlds /etc/rc.d/rc3.d/K50hlds</span><br />
<span style="color: #666666; font-style: italic;"># or use update-rc.d if you got a system using that tool (like Debian, see manpage)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Or use it manually like:</span><br />
<span style="color: #666666; font-style: italic;"># ./hlds start</span><br />
<span style="color: #666666; font-style: italic;"># ./hlds stop</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To see the server-console start the script with the parameter &quot;watch&quot;.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># DOC by jwm (jwm@counter-strike.de)</span><br />
<br />
<span style="color: #666666; font-style: italic;"># !!!!!!!!!!!!!! CHANGE THIS TO THE USER YOU USE FOR YOUR SERVER !!!!!!!!!!!!!!!</span><br />
<span style="color: #007800;">CS_USER</span>=csserveruser<br />
<br />
<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<br />
<br />
<span style="color: #666666; font-style: italic;"># # DON'T FORGET TO CHANGE THE PATH TO YOUR NEEDS!</span><br />
<span style="color: #007800;">DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>hlds<br />
<br />
<span style="color: #007800;">DAEMON</span>=hlds_run<br />
<br />
<span style="color: #666666; font-style: italic;"># LAN server:</span><br />
<span style="color: #666666; font-style: italic;"># PARAMS=&quot;-game cstrike -nomaster -insecure +sv_lan 1 +maxplayers 16 +map de_dust&quot;</span><br />
<span style="color: #666666; font-style: italic;"># Internet server:</span><br />
<span style="color: #007800;">PARAMS</span>=<span style="color: #ff0000;">&quot;-game cstrike +map de_dust +maxplayers 12 -port 27015&quot;</span><br />
<br />
<span style="color: #007800;">NAME</span>=csserver<br />
<span style="color: #007800;">DESC</span>=<span style="color: #ff0000;">&quot;CS dedicated server&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># No edits (should be) necessary beyond this line</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">which</span> <span style="color: #c20cb9; font-weight: bold;">awk</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You need awk for this script&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">which</span> <span style="color: #c20cb9; font-weight: bold;">screen</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You need screen (the program, moron!) for this script&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">whoami</span><span style="color: #000000; font-weight: bold;">`</span> = root <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000; font-weight: bold;">then</span><br />
<span style="color: #007800;">usagetype</span>=root<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
<span style="color: #007800;">usagetype</span>=nonroot<br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$DIR</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... No such directory: <span style="color: #007800;">$DIR</span>!&quot;</span>; &nbsp;<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-x</span> <span style="color: #007800;">$DIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$DAEMON</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DIR</span>/<span style="color: #007800;">$DAEMON</span> does not exist or is not executable!&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">if</span> status; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... <span style="color: #007800;">$DESC</span>: <span style="color: #007800;">$NAME</span> is already running!&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$usagetype</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
root<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - <span style="color: #007800;">$CS_USER</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;cd <span style="color: #007800;">$DIR</span> ; screen -AmdS <span style="color: #007800;">$NAME</span> ./<span style="color: #007800;">$DAEMON</span> <span style="color: #007800;">$PARAMS</span>&quot;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
nonroot<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$DIR</span> ; <span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-AmdS</span> <span style="color: #007800;">$NAME</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$DAEMON</span> <span style="color: #007800;">$PARAMS</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<span style="color: #000000; font-weight: bold;">esac</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
stop <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> status; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... <span style="color: #007800;">$DESC</span> <span style="color: #007800;">$NAME</span> could not be found. Probably not running.&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$usagetype</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
root<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #007800;">tmp</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">su</span> - <span style="color: #007800;">$CS_USER</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;screen -ls&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>2 ~ /^<span style="color: #007800;">$NAME</span>[[:space:]].*/ {print <span style="color: #000099; font-weight: bold;">\$</span>1}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - <span style="color: #007800;">$CS_USER</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;screen -r <span style="color: #007800;">$tmp</span> -X quit&quot;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
nonroot<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-r</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-ls</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>2 ~ /^<span style="color: #007800;">$NAME</span>[[:space:]].*/ {print <span style="color: #000099; font-weight: bold;">\$</span>1}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">-X</span> quit<br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<span style="color: #000000; font-weight: bold;">esac</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
status <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$usagetype</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
root<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - <span style="color: #007800;">$CS_USER</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;screen -ls&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>.<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #007800;">$NAME</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>:space:<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
nonroot<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-ls</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>.<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #007800;">$NAME</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>:space:<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<span style="color: #000000; font-weight: bold;">esac</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
watch <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> status; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DESC</span> <span style="color: #007800;">$NAME</span> could not be found. Probably not running.&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$usagetype</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
root<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #007800;">tmp</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">su</span> - <span style="color: #007800;">$CS_USER</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;screen -ls&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>2 ~ /^<span style="color: #007800;">$NAME</span>[[:space:]].*/ {print <span style="color: #000099; font-weight: bold;">\$</span>1}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - <span style="color: #007800;">$CS_USER</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;screen -r <span style="color: #007800;">$tmp</span>&quot;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
nonroot<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-r</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-ls</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>2 ~ /^<span style="color: #007800;">$NAME</span>[[:space:]].*/ {print <span style="color: #000099; font-weight: bold;">\$</span>1}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<span style="color: #000000; font-weight: bold;">esac</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
start<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting <span style="color: #007800;">$DESC</span>: <span style="color: #007800;">$NAME</span>&quot;</span><br />
start<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... done.&quot;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<br />
stop<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Stopping <span style="color: #007800;">$DESC</span>: <span style="color: #007800;">$NAME</span>&quot;</span><br />
stop<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... done.&quot;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<br />
restart<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Restarting <span style="color: #007800;">$DESC</span>: <span style="color: #007800;">$NAME</span>&quot;</span><br />
status <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; stop<br />
start<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... done.&quot;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<br />
status<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">if</span> status<br />
<span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DESC</span>: <span style="color: #007800;">$NAME</span> is UP&quot;</span><br />
<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DESC</span>: <span style="color: #007800;">$NAME</span> is DOWN&quot;</span><br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
watch<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
watch<br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: $0 {start|stop|status|restart|watch}<span style="color: #000099; font-weight: bold;">\n</span>While watching press ctrl-a, ctrl-d to stop watching without stopping the server.&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">exit</span> 1<br />
<span style="color: #000000; font-weight: bold;">;;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">esac</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></div></td></tr></tbody></table></div>
<p><span><span>Данный скрипт найден на <a href="http://forum.ubuntuusers.de/topic/mehrere-counter-strike-server-in-einem-starts/">каком-то немецком форуме</a>,  за что честь им и хвала. <img src='http://dcsk.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  А теперь разбор изменяемых параметров:</span></span></p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">CS_USER</span>=csserveruser</div></td></tr></tbody></table></div>
<p>Изменение пользователя, под которым будет запускатся наш сервер.</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>hlds<br />
<br />
<span style="color: #007800;">DAEMON</span>=hlds_run</div></td></tr></tbody></table></div>
<p>Настройка папки, где находится наш сервер и название скрипта hlds_run соответственно.</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># LAN server:</span><br />
<span style="color: #666666; font-style: italic;"># PARAMS=&quot;-game cstrike -nomaster -insecure +sv_lan 1 +maxplayers 16 +map de_dust&quot;</span><br />
<span style="color: #666666; font-style: italic;"># Internet server:</span><br />
<span style="color: #007800;">PARAMS</span>=<span style="color: #ff0000;">&quot;-game cstrike +map de_dust +maxplayers 12 -port 27015&quot;</span></div></td></tr></tbody></table></div>
<p>Параметры запуска сервера.</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">NAME</span>=csserver<br />
<span style="color: #007800;">DESC</span>=<span style="color: #ff0000;">&quot;CS dedicated server&quot;</span></div></td></tr></tbody></table></div>
<p>Настройки для screen, если один сервер &#8211; их изменять не надо.</p>
<p>Итак, теперь у нас есть steam сервер counter-strike последней на данный момент версии. В следующей статье я опишу как установить и настроить amxmodx мод и настроить сервер..</p>
]]></content:encoded>
			<wfw:commentRss>http://dcsk.org.ua/2009/08/nastrojka-counter-strike-servera-pod-debianubuntu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
