Marry Christmas & Happy New Year ! ! !
Cum pot face ca sa se reporneasca serverul automat
la fel repornirea sa o pot modifica, adica (harti, max.players) daca nu e posibil rog sa fie - mapa: fy_snow , max.players: 18
Serverul se afla pe Linux
id meu Y!M: [email protected]
E-mail: [email protected]
Ms anticipat, cer scuze daca am postat dublu, prin search am cautat, postul n-am gasit.
RePornirea Automata serv CS pe Linux
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
- TiTex
- Membru, skill +1
- Posts: 400
- Joined: 14 Feb 2009, 00:08
- Detinator Steam: Da
- Detinator server CS: cs.ilogicgroup.org
- Been thanked: 35 times
- Contact:
Code: Select all
#!/bin/sh
# Linux HLDS Init Script
# Server options
TITLE='IlogicGroup Cs1.6 #Sv1' # Titlu pornire script
LONGNAME='Counter-Strike' # Numele jocului
NAME='cstrike' # Numele screen-ului (ca sa te atasezi la consola)
DAEMON='hlds_run' # InitScriptul de la valve
STEAM='/home/jocuri/sv1hlds' # Folderul unde e instalat serverul
USER='jocuri' # Userul pe care ruleaza hlds-ul
# Game options
IP='72.52.248.250' # IP-ul serverului
PORT='27015' # Portul serverului
MAP='de_dust2' # Harta cu care porneste
GAME='cstrike' # Jocul serverului (tfc|cstrike|valve|dod|...)
SIZE='24' # Maxim jucatori
# Server options string
OPTS="-game $GAME +hostname \"$CLIENT\" +map $MAP +ip $IP -port $PORT \
-autoupdate +maxplayers $SIZE -pidfile $STEAM/$GAME/$NAME.pid"
# Screen command
INTERFACE="/usr/bin/screen -A -m -d -S $NAME"
service_start() {
# Check if the pid files currently exist
if [ ! -f $STEAM/$GAME/$NAME.pid ] && [ ! -f $STEAM/$GAME/$NAME-screen.pid ]; then
if [ -x $STEAM/$DAEMON ]; then
echo "Starting $TITLE - $LONGNAME"
echo "Server IP: $IP"
echo "Server port: $PORT"
echo "Server size: $SIZE players"
cd $STEAM
$INTERFACE $STEAM/$DAEMON $OPTS
# Prevent race condition on SMP kernels
sleep 1
# Find and write current process id of the screen process
ps -ef | grep SCREEN | grep "$NAME" | grep -v grep | awk '{ print $2}' > $STEAM/$GAME/$NAME-screen.pid
echo "$TITLE screen process ID written to $STEAM/$GAME/$NAME-screen.pid"
echo "$TITLE server process ID written to $STEAM/$GAME/$NAME.pid"
echo "$TITLE started."
fi
else
echo -e "Cannot start $TITLE. Server is already running."
#exit 1
fi
}
service_stop() {
if [ -f $STEAM/$GAME/$NAME.pid ] && [ -f $STEAM/$GAME/$NAME-screen.pid ]; then
echo "Stopping $TITLE - $LONGNAME."
# Get the process ID from the pid file we created earlier
for id in `cat $STEAM/$GAME/$NAME-screen.pid`
do kill -9 $id
echo "Killing process ID $id"
echo "Removing $TITLE screen pid file"
rm -rf $STEAM/$GAME/$NAME-screen.pid
break
done
# Remove server pid file
echo "Removing $TITLE pid file"
rm -rf $STEAM/$GAME/$NAME.pid
# Wipe all old screen sessions
screen -wipe 1> /dev/null 2> /dev/null
echo "$TITLE stopped."
else
echo -e "Cannot stop $TITLE. Server is not running."
#exit 1
fi
}
case "$1" in
'start')
service_start
;;
'stop')
service_stop
;;
'restart')
service_stop
sleep 1
service_start
;;
*)
echo "Usage $0 start|stop|restart"
esac
pe debian/ubuntu salvezi textu de mai sus intr-un fisier de exemplu hlds_start (atentie la linebreak)
apoi executa comenzile astea
Code: Select all
chmod +x hlds_start
sudo update-rc.d hlds_start defaults
Code: Select all
/etc/init.d/hlds_start start
Code: Select all
/etc/init.d/hlds_start stop
Code: Select all
/etc/init.d/hlds_start restart
Academician, profesor, doctor, inginer, honoris cauza si premiul Nobel
Dar prefer sa inchei,oricum nimeni n`o s`asculte.
[ Ardealul e al nost' http://www.ilogicgroup.org ]
Si ar mai fi de zis multe,mult,mult prea multeDar prefer sa inchei,oricum nimeni n`o s`asculte.
-
- Utilizator banat
- Posts: 527
- Joined: 13 Nov 2009, 19:44
- Detinator Steam: Da
- Reputatie: Ban 3 luni !
(Ban scos de 1 mai!)
Ban 3 luni ! - Has thanked: 10 times
- Been thanked: 30 times
da cum se reporneste automat un server pe windows ca am incercat toate posibilitatzile si nu am reusit
- CryWolf
- Administrator
- Posts: 6505
- Joined: 07 Aug 2008, 16:33
- Detinator Steam: Da
- Reputatie: Administrator
Fost Scripter
Manager CS2.eXtream.Ro
Fost Detinator ZM.eXtream.Ro
Fost manager CS.eXtream.Ro
Fost manager CSGO.eXtream.Ro
Fost manager global - Location: Botosani
- Discord: crywolf1989
- Has thanked: 202 times
- Been thanked: 850 times
- Contact:
Foloseste -> ServerDoc <-sNk _sNake wrote:da cum se reporneste automat un server pe windows ca am incercat toate posibilitatzile si nu am reusit
Si tutorial -> Tutorial Serverdoc - Cum se porneste automat un server Counter Strike , picat <-
NU IMI MAI DA-TI PM CU CERERE AJUTOR/SAMD, FOLOSITI FORUMUL, CITESC MAJORITATEA TOPICURILOR.
www.dark-arena.com , SERVERE CS / CS2 / L4D AU REVENIT ONLINE.
www.diasporaiptv.ro - SERVICII PREMIUM IPTV
www.dark-arena.com , SERVERE CS / CS2 / L4D AU REVENIT ONLINE.
www.diasporaiptv.ro - SERVICII PREMIUM IPTV
- H3adShoT
- Membru, skill +3
- Posts: 1254
- Joined: 03 May 2009, 19:19
- Detinator Steam: Da
- CS Status: Nu mai incercati sa-mi furati contul!
- Detinator server CS: Nimic
- SteamID: PM
- Reputatie: Restrictie moderator
- Location: Hunedoara
- Has thanked: 47 times
- Been thanked: 92 times
- Contact:
ai auzit de butonul search ?
http://www.extreamcs.com/forum/viewtopi ... 38&t=60411
http://www.extreamcs.com/forum/viewtopi ... 38&t=60411
Retras din activitate.
-
- Membru, skill 0
- Posts: 7
- Joined: 24 Dec 2009, 16:12
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com!
Iati FireDaemon si gata :) porneste automat :)
- blonda
- Membru, skill 0
- Posts: 12
- Joined: 10 May 2008, 07:29
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com!
- Detinator server CS: micro2.idle.ro
- Location: Targoviste
eu nu am reushit sa fac sa mearga:(... mai e functionabil?TiTex wrote:eu folosesc initscriptul acesta :)Code: Select all
#!/bin/sh # Linux HLDS Init Script # Server options TITLE='IlogicGroup Cs1.6 #Sv1' # Titlu pornire script LONGNAME='Counter-Strike' # Numele jocului NAME='cstrike' # Numele screen-ului (ca sa te atasezi la consola) DAEMON='hlds_run' # InitScriptul de la valve STEAM='/home/jocuri/sv1hlds' # Folderul unde e instalat serverul USER='jocuri' # Userul pe care ruleaza hlds-ul # Game options IP='72.52.248.250' # IP-ul serverului PORT='27015' # Portul serverului MAP='de_dust2' # Harta cu care porneste GAME='cstrike' # Jocul serverului (tfc|cstrike|valve|dod|...) SIZE='24' # Maxim jucatori # Server options string OPTS="-game $GAME +hostname \"$CLIENT\" +map $MAP +ip $IP -port $PORT \ -autoupdate +maxplayers $SIZE -pidfile $STEAM/$GAME/$NAME.pid" # Screen command INTERFACE="/usr/bin/screen -A -m -d -S $NAME" service_start() { # Check if the pid files currently exist if [ ! -f $STEAM/$GAME/$NAME.pid ] && [ ! -f $STEAM/$GAME/$NAME-screen.pid ]; then if [ -x $STEAM/$DAEMON ]; then echo "Starting $TITLE - $LONGNAME" echo "Server IP: $IP" echo "Server port: $PORT" echo "Server size: $SIZE players" cd $STEAM $INTERFACE $STEAM/$DAEMON $OPTS # Prevent race condition on SMP kernels sleep 1 # Find and write current process id of the screen process ps -ef | grep SCREEN | grep "$NAME" | grep -v grep | awk '{ print $2}' > $STEAM/$GAME/$NAME-screen.pid echo "$TITLE screen process ID written to $STEAM/$GAME/$NAME-screen.pid" echo "$TITLE server process ID written to $STEAM/$GAME/$NAME.pid" echo "$TITLE started." fi else echo -e "Cannot start $TITLE. Server is already running." #exit 1 fi } service_stop() { if [ -f $STEAM/$GAME/$NAME.pid ] && [ -f $STEAM/$GAME/$NAME-screen.pid ]; then echo "Stopping $TITLE - $LONGNAME." # Get the process ID from the pid file we created earlier for id in `cat $STEAM/$GAME/$NAME-screen.pid` do kill -9 $id echo "Killing process ID $id" echo "Removing $TITLE screen pid file" rm -rf $STEAM/$GAME/$NAME-screen.pid break done # Remove server pid file echo "Removing $TITLE pid file" rm -rf $STEAM/$GAME/$NAME.pid # Wipe all old screen sessions screen -wipe 1> /dev/null 2> /dev/null echo "$TITLE stopped." else echo -e "Cannot stop $TITLE. Server is not running." #exit 1 fi } case "$1" in 'start') service_start ;; 'stop') service_stop ;; 'restart') service_stop sleep 1 service_start ;; *) echo "Usage $0 start|stop|restart" esac
pe debian/ubuntu salvezi textu de mai sus intr-un fisier de exemplu hlds_start (atentie la linebreak)
apoi executa comenzile asteaca sa pornesti serverul manualCode: Select all
chmod +x hlds_start sudo update-rc.d hlds_start defaults
Ca sa opresti serverul manualCode: Select all
/etc/init.d/hlds_start start
Ca sa restartezi serverul manualCode: Select all
/etc/init.d/hlds_start stop
Bafta!Code: Select all
/etc/init.d/hlds_start restart