Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 131964 Details for
Bug 123930
hlds init script not shutting down server
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for multiserver init scripts
halflife-steam.patch (text/plain), 3.20 KB, created by
Sergey Belyashov
on 2007-09-26 17:57:38 UTC
(
hide
)
Description:
patch for multiserver init scripts
Filename:
MIME Type:
Creator:
Sergey Belyashov
Created:
2007-09-26 17:57:38 UTC
Size:
3.20 KB
patch
obsolete
>diff -ruN /usr/portage/games-server/halflife-steam/files/hlds.confd /usr/portage/games-server/halflife-steam/files/hlds.confd >--- /usr/portage/games-server/halflife-steam/files/hlds.confd 2005-11-16 06:24:56.000000000 +0300 >+++ /usr/portage/games-server/halflife-steam/files/hlds.confd 2007-09-26 21:49:46.000000000 +0400 >@@ -10,5 +10,12 @@ > # srcds_i686 on most x86 systems > #HLDS_MT="srcds_i686" > >-# Here you can set your start options like game type and maxplayers ... >-HLDS_OPTS="-console -port 27015 -game cstrike +map de_dust +maxplayers 6" >+# Here you can set your common start options... >+HLDS_OPTS="-console +maxplayers 32" >+ >+# Here you can setup more than one server >+# You should for each server create variable HLDS_SERVER<N> (where <N> positive decimal number) >+# When you have enabled SERVER1 and SERVER3 then only first will be started >+HLDS_SERVER1="-game cstrike -port 27015 +map de_dust2" >+#HLDS_SERVER2="-game cstrike +ip a.b.c.d -port 27015 +map de_aztec15" >+#HLDS_SERVER3="-game cstrike +ip a.b.c.d -port 27016" >diff -ruN /usr/portage/games-server/halflife-steam/files/hlds.rc /usr/portage/games-server/halflife-steam/files/hlds.rc >--- /usr/portage/games-server/halflife-steam/files/hlds.rc 2005-11-16 06:24:56.000000000 +0300 >+++ /usr/portage/games-server/halflife-steam/files/hlds.rc 2007-09-25 23:26:57.000000000 +0400 >@@ -3,6 +3,8 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-x86/games-server/halflife-steam/files/hlds.rc,v 1.1 2005/11/16 03:24:56 vapier Exp $ > >+PID_PATH="/var/run" >+ > depend() { > use net > } >@@ -18,21 +20,57 @@ > return 0 > } > >-start() { >- checkconfig || return $? >+start_server() { >+ local serv_num=$1 >+ local serv_opts="`eval echo '$'HLDS_SERVER${serv_num}`" >+ local PID1=${PID_PATH}/hlds${serv_num}_1.pid >+ local PID2=${PID_PATH}/hlds${serv_num}_2.pid >+ rm -f $PID1 $PID2 > >- ebegin "Starting Halflife Dedicated Server" >- export LD_LIBRARY_PATH=${HLDS_PATH}:${HLDS_PATH}/bin:${LD_LIBRARY_PATH} >+ test $serv_num != 1 -a -z "$serv_opts" && return 1 >+ >+ ebegin "Starting Halflife Dedicated Server $serv_num" >+ touch ${PID2} >+ chown games:games ${PID2} > start-stop-daemon --start \ >- --chdir ${HLDS_PATH} -c @GAMES_USER@:@GAMES_GROUP@ \ >+ --chdir ${HLDS_PATH} -c games:games \ > -n ${HLDS_MT} -b -a ${HLDS_PATH}/${HLDS_MT} \ >+ -m --pidfile ${PID1} \ > -- \ >- -pidfile /var/run/hlds.pid ${HLDS_OPTS} >+ -pidfile ${PID2} ${HLDS_OPTS} ${serv_opts} > eend $? > } > >+stop_server() { >+ local serv_num=$1 >+ local PID1=${PID_PATH}/hlds${serv_num}_1.pid >+ local PID2=${PID_PATH}/hlds${serv_num}_2.pid >+ if test -f ${PID1} -a -f ${PID2}; then >+ ebegin "Stopping Halflife Dedicated Server $serv_num" >+ start-stop-daemon --stop --pidfile ${PID1} >+ start-stop-daemon --stop --pidfile ${PID2} >+ eend $? >+ rm -f $PID1 $PID2 >+ else >+ return 1 >+ fi >+ return 0 >+} >+ >+start() { >+ checkconfig || return $? >+ >+# ebegin "Starting Halflife Dedicated Server" >+ export LD_LIBRARY_PATH=${HLDS_PATH}:${HLDS_PATH}/bin:${LD_LIBRARY_PATH} >+ local i=1 >+ while start_server $i; do >+ i=$(($i+1)) >+ done >+} >+ > stop() { >- ebegin "Stopping Halflife Dedicated Server" >- start-stop-daemon --stop --pidfile /var/run/hlds.pid >- eend $? >+ local i=1 >+ while stop_server $i; do >+ i=$(($i+1)) >+ done > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 123930
: 131964