Skocz do zawartości
VenoxSkC

Serwer Cs'a 1.6 na VpS

Polecane posty

Witam mam problem z postawieniem serwera cs 1.6 linux .
Próbowałem ale coś nie trybi . Z tego co wiem teraz się coś pozmieniało i nie działa to na takiej zasadzie jak kiedyś . . Rok temu nie miałem problemu ..

 

Może ktoś napisać jakiś ma jakiś dobry poradnik .

Edytowano przez VenoxSkC (zobacz historię edycji)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
all@xxx:~/cs$ ./csserver restart
[ FAIL ] Stopping cs-server: is already stopped
[ FAIL ] Starting cs-server: Failed to start

Nie wiem co się dzieję jakby brakowało paru plików .

Edytowano przez VenoxSkC (zobacz historię edycji)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Przeczytałeś całą instrukcję?

SteamCMD ma problem związany z CS'em i należy kilkukrotnie uruchomić instalację.

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
Gość mFilmy.com

Pamiętaj wtedy, że oczywiście musisz zmienić wtedy port dla każdego innego serwera.

 

 

Wysłane z mojego iPad przez Tapatalk 2

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
Gość mFilmy.com

plik w cstrike/server.cfg bodajze.

 

 

Wysłane z mojego iPad przez Tapatalk 2

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
// Use this file to configure your DEDICATED server.
// This config file is executed on server start.

// disable autoaim
sv_aim 0

// disable clients' ability to pause the server
pausable 0

// default server name. Change to "Bob's Server", etc.
hostname "uVen0xa[FFA]"

// maximum client movement speed 
sv_maxspeed 320

// 20 minute timelimit
mp_timelimit 20

// cheats off
sv_cheats 0

// load ban files
exec listip.cfg
exec banned.cfg

// rcon passsword
rcon_password "xxx"

// Server password
sv_password ""

// server logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0

To jest cały server cfg.

Edytowano przez VenoxSkC (zobacz historię edycji)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Uruchamiaj serwer komendą:

./srcds_run -console -game cstrike +map mapa -maxplayers sloty -port port -autoupdate

 


Źle, podałem komendę do CSS...

Tutaj do CS1.6:

./hlds_run -game cstrike +port port +maxplayers sloty +exec server.cfg +map mapa -autoupdate

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

plik w cstrike/server.cfg bodajze. Wysłane z mojego iPad przez Tapatalk 2

 

Głupoty pleciesz................... ehhh stawiałeś kiedykolwiek? Wątpie

 

Kolego Venom - kopiujesz folder z csem (np. Serwer2)

 

I przy uruchamianiu pierwszego serwera:

./hlds_run -game cstrike +port 27015 +ip <ip> +maxplayers <liczba> +exec server.cfg +map <mapa> -pingboost 1 - domyślny

 

drugi serwer uruchamiasz:

./hlds_run -game cstrike +port 27016 +ip <ip> +maxplayers <liczba> +exec server.cfg +map <mapa> -pingboost 1 (a moze byc również inny ... 27111 / 27017 itd itd ..............

 

 

Pozdrawiam!

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
Gość Kamikadze

A czemu nie poczytasz w internecie o tym? Praktycznie na każdym forum NonSteamowców jest info jak postawić serwer...

 

 

Screen - jeżeli chcesz zachować serwer.

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
Gość Kamikadze

Ja kiedyś jak zaczynałem przygodę z linuxem to google 24/7 było odpalone. W sumie cały czas jest po kilku latach niezależnie co jest robione na serwerach :)

 

Wystarczy proste pytanie wpisać do google i wyskoczą odpowiednie wyniki. Nie jesteś pierwszym niedoświadczonym piszącym na forach internetowych. Wystarczy poszukać cierpliwie i trafi się na odpowiedni temat.

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Człowieku naucz sie korzystać z Google..... Dodatkowo takie pytania kieruj na GameHostingTalk....

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
Gość mFilmy.com

 

plik w cstrike/server.cfg bodajze. Wysłane z mojego iPad przez Tapatalk 2

 

 

 

 

Głupoty pleciesz................... ehhh stawiałeś kiedykolwiek? Wątpie

 

Kolego Venom - kopiujesz folder z csem (np. Serwer2)

 

I przy uruchamianiu pierwszego serwera:

./hlds_run -game cstrike +port 27015 +ip +maxplayers +exec server.cfg +map -pingboost 1 - domyślny

 

drugi serwer uruchamiasz:

./hlds_run -game cstrike +port 27016 +ip +maxplayers +exec server.cfg +map -pingboost 1 (a moze byc również inny ... 27111 / 27017 itd itd ..............

 

 

Pozdrawiam!

 

Jeżeli wpiszesz "port 27016" w server.cfg i resztę regułę, jak Maxplayers to nie musisz tyle tego pisac. Nie polecę głupot, tak jest. Po wpisaniu w server.cfg co trzeba uruchamiamy tak: ./hlds_run -game cstrike +exec server.cfg. Wystarczy. Po co sobie życie utrudniać?

 

 

Wysłane z mojego iPad przez Tapatalk 2

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

To już mam za sobą ogarnołem wszystko w 1 skrypcie już mam .

Skoro tu już jesteśmy co do autostartu . Czy idzie dodać screena żeby uruchamiał się przy autostarcie ? .

su all -c '~/ts3/ts3server_startscript.sh start'

su all -c '~/csffa/csserver start' <<< Tutaj jest 1 serwer cs'a leczy gdy chcę dodać drugi do autostartu gryzą się . a wgl. jest podawna inna scieszka .

#!/bin/bash
# Counter Strike
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 011013

#### Variables ####

# Notification Email
# (on|off)
emailnotification="off"
email="email@example.com"

# Start vars
defaultmap="de_aztec"
port="27015"

clientport="27005"
parms="-game cstrike +port 27016 +ip 185.25.149.70 +exec server.cfg +map de_dust2 -pingboost 1"

#### Advanced Variables ####

# Steam
appid="90"

# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/cstrike/server.cfg"
backupdir="${rootdir}/backups"

# Server names
servicename="cs-server"
gamename="Counter Strike 1.6"

engine="goldsource"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`

# Logging
logdays="7"
gamelogdir="${filesdir}/cstrike/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"

scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"

scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"

##### Script #####
# Do not edit
# unless you know
# what you are doing

fn_rootcheck(){
if [ `whoami` = "root" ];then
	echo -e "[\e[0;31m FAIL \e[0;39m] Script will not run as root!"
	exit
fi
}

fn_syscheck(){
if [ ! -e ${filesdir} ];then
	echo -e "[\e[0;31m FAIL \e[0;39m] Cannot access ${filesdir}: No such directory"
	exit
fi
}

fn_runcheck(){
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|wc -l)
if [ ${tmuxwc} -eq 1 ];then
	fn_serverquery
	echo -en "\r[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} is already running"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} is already running" >> ${scriptlog}
	sleep 0.5
	echo -en "\n"
	exit
fi
}

fn_logmanager(){
# log manager will active if finds logs older than ${logdays}
if [ `find ${scriptlogdir}/* -mtime +${logdays} |wc -l` -ne "0" ];then
	echo -e "[\e[0;32m  OK  \e[0;39m] Starting log cleaner"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Starting log cleaner" >> ${scriptlog}
	echo -e "[\e[0;36m INFO \e[0;39m] Removing logs older than ${logdays} days"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Removing logs older than ${logdays} days" >> ${scriptlog}
	find ${scriptlogdir}/* -mtime +${logdays} |tee >> ${scriptlog}
	find ${consolelogdir}/* -mtime +${logdays} |tee >> ${scriptlog}
	scriptcount=`find ${scriptlogdir}/* -mtime +${logdays}|wc -l`
	consolecount=`find ${consolelogdir}/* -mtime +${logdays}|wc -l`
	count=$((${scriptcount} + ${consolecount}))
	find ${scriptlogdir}/* -mtime +${logdays} -exec rm {} \;
	find ${consolelogdir}/* -mtime +${logdays} -exec rm {} \;
	echo -e "[\e[0;36m INFO \e[0;39m] Log cleaner removed ${count} log files"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Log cleaner removed ${count} log files" >> ${scriptlog}
fi
}

fn_debugserver(){
fn_rootcheck
fn_syscheck
echo ""
echo "${gamename} Debug"
echo "============================"
echo ""
echo -e "Use for identifying server issues only!"
echo -e "Press CTRL+c to drop out of debug mode"
echo -e "\e[0;31mWARNING!\e[0;39m If ${servicename} is already running it will be stopped"
echo ""
while true; do
	read -p "Continue? [y/N]" yn
	case $yn in
	[Yy]* ) break;;
	[Nn]* ) echo Exiting; return 1 ;;
	* ) echo "Please answer yes or no.";;
esac
done
fn_stopserver
echo -en "[ .... ] Starting ${servicename}: ${servername} debug mode"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Starting ${servername} debug mode" >> ${scriptlog}
sleep 0.5
echo -en "\r[\e[0;32m  OK  \e[0;39m] Starting ${servicename}: ${servername}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Started ${servername} debug mode" >> ${scriptlog}
sleep 0.5
echo -en "\n"
cd ${filesdir}
./hlds_run ${parms} -debug
}

fn_console(){
fn_rootcheck
fn_syscheck
echo ""
echo "${gamename} Console"
echo "============================"
echo ""
echo "Press \"CTRL+b d\" to exit console"
echo -e "\e[0;31mWARNING!\e[0;39m Do NOT press CTRL+c to exit"
echo ""
while true; do
	read -p "Continue? [y/N]" yn
	case $yn in
	[Yy]* ) break;;
	[Nn]* ) echo Exiting; return 1 ;;
	[Nn]* ) echo Exiting; return 1 ;;
	* ) echo "Please answer yes or no.";;
esac
done
echo -en "\r[ .... ] Starting ${servicename} console"
sleep 0.5
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|wc -l)
if [ ${tmuxwc} -eq 1 ];then
	echo -e "\r[\e[0;32m  OK  \e[0;39m] Starting ${servicename} console"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} console accessed" >> ${scriptlog}
	sleep 1
	tmux attach-session -t $(tmux list-sessions|awk '{print $1}')
else
	echo -e "\r[\e[0;31m FAIL \e[0;39m] Starting ${servicename} console: ${servername} not running"
	sleep 0.5
	while true; do
		read -p "Do you want to start the server? [y/N]" yn
		case $yn in
		[Yy]* ) fn_startserver;break;;
		[Nn]* ) break;;
		* ) echo "Please answer yes or no.";;
	esac
	done
fi
}

fn_backupserver(){
fn_rootcheck
fn_syscheck
backupname="${servicename}-$(date '+%Y-%m-%d-%H%M%S')"
echo ""
echo "${gamename} Backup"
echo "============================"
echo ""
echo "The following backup will be created."
echo ""
echo "${backupdir}/${backupname}.tar.gz"
echo ""
while true; do
	read -p "Continue? [y/N]" yn
	case $yn in
	[Yy]* ) break;;
	[Nn]* ) echo Exiting; return 1 ;;
	* ) echo "Please answer yes or no.";;
esac
done
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|wc -l)
if [ ${tmuxwc} -eq 1 ];then
	echo -e "\e[0;31mWARNING!\e[0;39m ${servicename} is currently running"
	while true; do
		read -p "Would you like to stop ${servicename} while running the backup? [y/N]" yn
		case $yn in
		[Yy]* ) fn_stopserver;break;;
		[Nn]* ) break;;
		* ) echo "Please answer yes or no.";;
	esac
	done
fi
echo -en "[ .... ] Starting ${servicename}: ${servername} backup"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Starting ${servername} backup" >> ${scriptlog}
sleep 0.5
echo -en "\r[\e[0;32m  OK  \e[0;39m] Starting ${servicename}: ${servername} backup"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Started ${servername} backup" >> ${scriptlog}
sleep 1
echo -en "\n"
cd ${rootdir}
mkdir ${backupdir} > /dev/null 2>&1
tar -cvzf  ${backupdir}/${backupname}.tar.gz  --exclude '${backupdir}' ${rootdir}
echo -en "\r${servicename} backup complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: backup complete" >> ${scriptlog}
}

fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION	DESCRIPTION		PORT"
echo "INBOUND		Game/Rcon Port		${port}"
if [ "${engine}" = "source" ];then
	echo "INBOUND		SourceTV Port		${sourcetvport}"
fi
echo "OUTBOUND	Client Port		${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
echo ""
}

fn_distro(){
arch=$(uname -m)
kernel=$(uname -r)
if [ -f /etc/lsb-release ]; then
	os=$(lsb_release -s -d)
elif [ -f /etc/debian_version ]; then
	os="Debian $(cat /etc/debian_version)"
elif [ -f /etc/redhat-release ]; then
	os=`cat /etc/redhat-release`
else
	os="$(uname -s) $(uname -r)"
fi
}

fn_uptime(){
uptime=$(</proc/uptime)
uptime=${uptime%%.*}
minutes=$(( uptime/60%60 ))
hours=$(( uptime/60/60%24 ))
days=$(( uptime/60/60/24 ))
}

fn_load(){
load=$(uptime | awk -F 'load average' '{ print $2 }')
}

fn_emailnotification(){
fn_distro
fn_uptime
fn_load
{
echo -e "========================================\n${servicename} details\n========================================\n"
echo -e "Service: ${servicename}"
echo -e "Game: ${gamename}"
echo -e "Server: ${servername}"
echo -e "Failure reason: ${failurereason}"
echo -e "Action Taken: ${actiontaken}\n"
echo -e "========================================\nServer details\n========================================\n"
echo -e "Date: $(date)"
echo -e "Distro: ${os}"
echo -e "Arch: ${arch}"
echo -e "Kernel: ${kernel}"
echo -e "Hostname: $HOSTNAME"
echo -e "Uptime: ${days}d, ${hours}h, ${minutes}m"
echo -e "Avg Load${load}\n"
echo -e "========================================\nLogs\n========================================\n"
echo -e "Script log\n===================\n"
}|tee ${scriptlogdir}/${servicename}-email.log > /dev/null 2>&1
tail -25 ${scriptlog} >> ${emaillog}
if [ ! -z ${consolelog} ];then
	echo -e "\n\nConsole log\n====================\n" >> ${emaillog}
	tail -25 ${consolelog} >> ${emaillog}
fi
if [ ! -z ${gamelogdir} ];then
	echo -e "\n\nServer log\n====================\n" >> ${emaillog}
	tail ${gamelogdir}/*|grep -v "==>"|sed '/^$/d'|tail -25 >> ${emaillog}
fi
mail -s "${subject}" ${email} < ${emaillog}
echo -en "[\e[0;36m INFO \e[0;39m] Sent email notification to ${email}"
echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: Sent email notification to ${email}" >> ${scriptlog}
}

fn_emailtest(){
fn_rootcheck
fn_syscheck
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Emailing test notification" >> ${scriptlog}
if [ "${emailnotification}" = "on" ];then
	subject="${servicename} Email Test Notification - Testing ${servername}"
	failurereason="Testing ${servicename} email notification"
	actiontaken="Sent test email...hello is this thing on?"
	fn_emailnotification
else
	echo -e "[\e[0;31m FAIL \e[0;39m] Email notification not enabled"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notification not enabled" >> ${scriptlog}
fi
sleep 0.5
echo -en "\n"
}

fn_serverquery(){
# uses serverquery.py to directly query the server
# detects if the server locks up
if [ -f serverquery.py ];then
	echo -e "[\e[0;36m INFO \e[0;39m] serverquery.py detected"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: serverquery.py detected" >> ${scriptlog}
	echo -e "[\e[0;32m  OK  \e[0;39m] Querying ${servicename}: ${servername}: QUERYING"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: QUERYING" >> ${scriptlog}
	serverquery=`./serverquery.py 127.0.0.1 ${port} 2>&1`
	sleep 1
	if [ "${serverquery}" = "ERROR 1" ]||[ "${serverquery}" = "ERROR 2" ]||[ "${serverquery}" = "ERROR 3" ];then
		echo -e "[\e[0;31m FAIL \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
		echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${scriptlog}
		sleep 1
		echo -e "[\e[1;33m WARN \e[0;39m] ${servicename}: Monitor detected ${servername} has locked up!"
		echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${scriptlog}
		sleep 1
		fn_restartserver
	else
		echo -e "[\e[0;32m  OK  \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
		echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${scriptlog}
		sleep 1
	fi
fi
}

fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_logmanager
echo -en "[ .... ] Monitor is checking ${servicename}: ${servername}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor is checking ${servername}" >> ${scriptlog}
sleep 0.5
updatecheck=`ps -ef|grep "${selfname} update"|grep -v grep|wc -l`
if [ "${updatecheck}" = "0" ];then
	fn_runcheck
	echo -en "\r[\e[1;33m WARN \e[0;39m] ${servicename}: Monitor detected ${servername} had stopped!"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} had stopped!" >> ${scriptlog}
	if [ "${emailnotification}" = "on" ];then
		subject="${servicename} Monitor - Starting ${servername}"
		failurereason="${servicename} process was not running"
		actiontaken="restarted ${servicename}"
		sleep 0.5
		echo -en "\n"
		fn_emailnotification
	fi
	sleep 0.5
	echo -en "\n"	
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor is starting ${servername}" >> ${scriptlog}
	fn_startserver
else
	echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: Monitor detected ${servername} is currently checking for updates!"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${scriptlog}
	echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${scriptlog}
fi
}

fn_updateserver(){
fn_rootcheck
fn_syscheck
echo -e "[\e[0;32m  OK  \e[0;39m] Updating ${servicename}: ${servername}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Updating ${servername}" >> ${scriptlog}
cd ${rootdir}
cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${scriptlog}
}

fn_restartserver(){
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Restarting ${servername}" >> ${scriptlog}
fn_stopserver
fn_startserver
}

fn_stopserver(){
fn_rootcheck
fn_syscheck
pid=$(tmux list-sessions 2>&1|awk '{print $1}')
echo -en "[ .... ] Stopping ${servicename}: ${servername}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Stopping ${servername}" >> ${scriptlog}
sleep 0.5
if [ "${pid}" == "failed" ];then
	echo -en "\r[\e[0;31m FAIL \e[0;39m] Stopping ${servicename}: ${servername} is already stopped"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} is already stopped" >> ${scriptlog}
else
	tmux kill-session -t ${servicename}
	echo -en "\r[\e[0;32m  OK  \e[0;39m] Stopping ${servicename}: ${servername}"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Stopped ${servername}" >> ${scriptlog}
fi
sleep 0.5
echo -en "\n"
}

fn_startserver(){
fn_rootcheck
fn_syscheck
echo -en "[ .... ] Starting ${servicename}: ${servername}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Starting ${servername}" >> ${scriptlog}
sleep 0.5
fn_runcheck
fn_logmanager
mv ${scriptlog} ${scriptlogdate}
mv ${consolelog} ${consolelogdate}
cd ${filesdir}
tmux new-session -d -s ${servicename} "./hlds_run ${parms} |tee -a ${consolelog}"
tmuxwc=`tmux list-sessions 2>&1|awk '{print $1}'|wc -l`
sleep 1
if [ ${tmuxwc} -eq 0 ];then
	echo -en "\r[\e[0;31m FAIL \e[0;39m] Starting ${servicename}: Failed to start ${servername}"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: failed to start ${servername}" >> ${scriptlog}
else
	echo -en "\r[\e[0;32m  OK  \e[0;39m] Starting ${servicename}: ${servername}"
	echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Started ${servername}" >> ${scriptlog}
fi
sleep 0.5
echo -en "\n"
}

#
## Installer
#

fn_header(){
clear
echo "================================="
echo "${gamename}"
echo "Server Linux Installer"
echo "by Daniel Gibbs"
echo "http://danielgibbs.co.uk"
echo "================================="
echo ""
}

fn_steamdl(){
echo "Installing Steam"
echo "================================="
cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
	wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
	tar --verbose -zxf steamcmd_linux.tar.gz
	rm -v steamcmd_linux.tar.gz
	chmod +x steam.sh
else
	echo "Steam already installed!"
fi
}

fn_retryinstall(){
while true; do
	read -p "Retry install? [y/N]" yn
	case $yn in
	[Yy]* ) fn_install;;
	[Nn]* ) echo Exiting; exit ;;
	* ) echo "Please answer yes or no.";;
	esac
done
}

fn_install(){
fn_rootcheck
fn_header
if [ -d ${filesdir} ];then
	echo "${gamename} Server is already installed here:"
	pwd
	echo ""
	while true; do
		read -p "Continue [y/N]" yn
		case $yn in
		[Yy]* ) break;;
		[Nn]* ) echo Exiting; return 1 ;;
		* ) echo "Please answer yes or no.";;
		esac
	done
fi
fn_header
echo "Install Directory:"
pwd
echo ""
while true; do
	read -p "Continue [y/N]" yn
	case $yn in
	[Yy]* ) break;;
	[Nn]* ) echo Exiting; return 1 ;;
	* ) echo "Please answer yes or no.";;
    esac
done
fn_header
fn_steamdl
echo ""
echo "Installing ${gamename} Server"
echo "================================="
	rm -f ${servercfg}
	cd ${rootdir}/steamcmd
	mkdir -v ${filesdir}
	touch install.txt
	chmod 0600 install.txt
	echo "login anonymous" > install.txt
	echo "force_install_dir ${filesdir}" >> install.txt
	echo "app_update ${appid} validate" >> install.txt
	echo "quit" >> install.txt
	STEAMEXE=steamcmd ./steam.sh +runscript install.txt
	rm install.txt
	echo ""
	echo "================================="
	while true; do
		read -p "Was the install successful? [y/N]" yn
		case $yn in
		[Yy]* ) break;;
		[Nn]* ) fn_retryinstall ;;
		* ) echo "Please answer yes or no.";;
		esac
	done
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
	read -p "Enter server name: " servername
	read -p "Enter rcon password: " rconpass
	sleep 1
	echo ""
	echo "Creating server.cfg"
	touch ${servercfg}
	touch ${filesdir}/cstrike/listip.cfg
	touch ${filesdir}/cstrike/banned.cfg
	{
		echo -e "// Use this file to configure your DEDICATED server."
		echo -e "// This config file is executed on server start."
		echo -e ""
		echo -e "// disable autoaim"
		echo -e "sv_aim 0"
		echo -e ""
		echo -e "// disable clients' ability to pause the server"
		echo -e "pausable 0"
		echo -e ""
		echo -e "// default server name. Change to \"Bob's Server\", etc."

		echo -e "hostname \"${servername}\""
		echo -e ""
		echo -e "// maximum client movement speed "
		echo -e "sv_maxspeed 320"
		echo -e ""
		echo -e "// 20 minute timelimit"
		echo -e "mp_timelimit 20"
		echo -e ""
		echo -e "// cheats off"
		echo -e "sv_cheats 0"
		echo -e ""
		echo -e "// load ban files"
		echo -e "exec listip.cfg"
		echo -e "exec banned.cfg"
		echo -e ""
		echo -e "// rcon passsword"
		echo -e "rcon_password \"${rconpass}\""
		echo -e ""
		echo -e "// Server password"
		echo -e "sv_password \"\""
		echo -e ""
		echo -e "// server logging"
		echo -e "log on"
		echo -e "sv_logbans 1"
		echo -e "sv_logecho 1"
		echo -e "sv_logfile 1"
		echo -e "sv_log_onefile 0"
	}|tee ${servercfg} > /dev/null 2>&1
	sleep 1
	echo ""
	echo "Creating log directorys"
	mkdir -v ${rootdir}/log
	mkdir -v ${scriptlogdir}
	mkdir -v ${consolelogdir}
	touch ${consolelog}
	if [ ! -h ${rootdir}/log/server ]; then
		ln -sv ${gamelogdir} ${rootdir}/log/server
	else
		echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
	fi
	sleep 1
	echo ""
	echo "Applying steamclient.so fix"
	mkdir -v ${rootdir}/.steam
	mkdir -v ${rootdir}/.steam/sdk32
	cp -v ${filesdir}/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
	sleep 1
	fn_header
	fn_details
	echo "================================="
	echo "Install Complete!"
	echo ""
	echo "To start server type:"
	echo "${selfname} start"
	echo ""
}

case "$1" in
	start)
		fn_startserver;;
	stop)
		fn_stopserver;;
	restart)
		fn_restartserver;;
	update)
		fn_stopserver
		fn_updateserver
		fn_startserver;;
	monitor)
		fn_monitorserver;;
	email-test)
		fn_emailtest;;
	details)
		fn_details;;
	backup)
		fn_backupserver;;
	console)
		fn_console;;
	debug)
		fn_debugserver;;
	install)
		fn_install;;
	*)
	echo "Usage: $0 {start|stop|restart|update|monitor|email-test|details|backup|console|debug|install}"
	exit 1;;
esac
exit

Może to nie odpowiedni dział lub forum lecz ktoś może mieć pojęcie . Przy podkładaniu bomby serwer wybucha crash .
Jedyny logi jakie się pokazują to :

Auto-restarting the server on crash

Console initialized.
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 17:45:07 Apr 25 2013 (6027)
STEAM Auth Server
Server IP address 185.25.149.70:27016
   
   Metamod version 1.21p37 Copyright (c) 2001-2013 Will Day
     Patch: Metamod-P (mm-p) v37 Copyright (c) 2004-2013 Jussi Kivilinna
   Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
   This is free software, and you are welcome to redistribute it
   under certain conditions; type `meta gpl' for details.
   

   AMX Mod X version 1.75a Copyright (c) 2004-2006 AMX Mod X Development Team 
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under 
   certain conditions; type 'amxx gpl' for details.
  
[AMXX] Loaded 1 admin from file

Executing AMX Mod X Configuration File 
Scrolling message displaying frequency: 10:00 minutes
maxplayers cannot be changed while a server is running.
maxplayers cannot be changed while a server is running.
Connection to Steam servers successful.
   VAC secure mode is activated.

NIe bardzo z tego coś mogę wyczytać

 

Edytowano przez VenoxSkC (zobacz historię edycji)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Bądź aktywny! Zaloguj się lub utwórz konto

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto

Zarejestruj nowe konto, to proste!

Zarejestruj nowe konto

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się


×