我正在使用 screen 在我的专用服务器上托管一些反恐精英游戏服务器。当我想启动/停止服务器时,我运行了这个脚本:
#! /bin/sh
# /etc/init.d/css-server
#
case "$1" in
start)
echo "Starting Nullus Imprimis war server..."
screen -A -m -d -S css-war-server /home/css-servers/war-server/css/srcds_run -game cstrike +map de_dust2 +maxplayers 16 -autoupdate -port 2555 -tick 100
echo "Nullus Imprimis war server started"
echo "Starting Nullus Imprimis pub server #1..."
screen -A -m -d -S css-pub-server-1 /home/css-servers/pub-server-1/css/srcds_run -game cstrike +map de_dust2 +maxplayers 32 -autoupdate -port 2666 -tickrate 100
echo "Nullus Imprimis pub server #1 started"
;;
stop)
echo "Stopping Nullus Imprimis …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的 Ubuntu 机器上安装反恐精英:源服务器。
我在指南中使用HLDS工具在这里。
我已下载hldsupdatetool.bin
到我的主目录 ( /home/chris/cssserver/hldsupdatetool.bin
) 并运行它告诉我的命令,但该文件似乎从未运行过。这是我的终端:
chris@ks395362:~/cssserver$ wget http://storefront.steampowered.com/download/hldsupdatetool.bin
--2012-07-15 21:29:56-- http://storefront.steampowered.com/download/hldsupdatetool.bin
Resolving storefront.steampowered.com... 87.248.210.253, 87.248.210.254
Connecting to storefront.steampowered.com|87.248.210.253|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3513408 (3.4M) [application/octet-stream]
Saving to: `hldsupdatetool.bin'
100%[======================================>] 3,513,408 10.4M/s in 0.3s
2012-07-15 21:29:57 (10.4 MB/s) - `hldsupdatetool.bin' saved [3513408/3513408]
chris@ks395362:~/cssserver$ sudo chmod +x hldsupdatetool.bin
chris@ks395362:~/cssserver$ sudo ./hldsupdatetool.bin
chris@ks395362:~/cssserver$ ls
hldsupdatetool.bin
chris@ks395362:~/cssserver$ file hldsupdatetool.bin
hldsupdatetool.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked …
Run Code Online (Sandbox Code Playgroud)