3 CLUSTER_NAME
=DesignGalaxy
4 CENTRAL_SERVER_ADDRESS
=$HOSTNAME
5 GAME_SCENE
=tatooine.trn
6 LOGIN_SERVER_ADDRESS
=swo-dev6.station.sony.com
7 EXE_DIR
=/swo
/swg
/current
/exe
/linux
8 CENTRAL_PLANET_PORT
=44475
9 CENTRAL_GAME_PORT
=44471
13 killall CentralServer_r
&>/dev
/null
14 killall CentralServer_d
&>/dev
/null
15 killall addr2line
&>/dev
/null
22 AVAIL
=`netstat -aut|grep $PORT`
23 while [ -n "$AVAIL" ];
27 AVAIL
=`netstat -aut|grep $PORT`
36 echo "** Starting CentralServer at " $
(date +"%Y%m%d-%k.%M.%S") >> /swo
/swg
/CentralServer.log
37 .
/CentralServer_d
-- \
39 loginServerAddress
=$LOGIN_SERVER_ADDRESS \
40 clusterName
=$CLUSTER_NAME \
41 gameServicePort
=$CENTRAL_GAME_PORT \
42 planetServicePort
=$CENTRAL_PLANET_PORT \
43 >> /swo
/swg
/CentralServer.log
2>&1 &
49 echo "** Starting ConnectionServer at " $
(date +"%Y%m%d-%k.%M.%S") >> /swo
/swg
/ConnectionServer.log
50 .
/ConnectionServer_d
-- \
52 clusterName
=$CLUSTER_NAME \
53 loginServerAddress
=$LOGIN_SERVER_ADDRESS \
54 centralServicePort
=44482 \
55 clientServicePort
=44483 \
56 gameServicePort
=44484 \
57 >> /swo
/swg
/ConnectionServer.log
2>&1 &
63 echo "** Starting DBProcess at " $
(date +"%Y%m%d-%k.%M.%S") >> /swo
/swg
/dbprocess.log
64 .
/SwgDatabaseServer_d
-- \
66 centralServerAddress
=$CENTRAL_SERVER_ADDRESS \
67 centralServerPort
=$CENTRAL_GAME_PORT \
69 databaseProtocol
=OCI \
70 databaseUID
=designcluster \
71 databasePWD
=changeme \
73 >> /swo
/swg
/SwgDatabaseServer.log
2>&1 &
79 echo "** Starting GameServer at " $
(date +"%Y%m%d-%k.%M.%S") >> /swo
/swg
/SwgGameServer.log
80 .
/SwgGameServer_d
-- @..
/..
/exe
/shared
/servercommon.cfg @combat.cfg \
81 -s GameServer sceneID
=tatooine \
82 centralServerAddress
=$CENTRAL_SERVER_ADDRESS \
83 centralServerPort
=$CENTRAL_GAME_PORT \
84 groundScene
=terrain
/$GAME_SCENE \
85 clusterName
=$CLUSTER_NAME \
87 javaLibPath
=/usr
/noScriptsOnBaseServer \
88 scriptPath
=..
/..
/data
/sku
.0/sys.server
/plt.shared
/loc.shared
/compiled
/game \
89 useRemoteDebugJava
=0 \
93 warningCallStackDepth
=0 \
96 >> /swo
/swg
/SwgGameServer.log
2>&1 &
102 echo "** Starting PlanetServer at " $
(date +"%Y%m%d-%k.%M.%S") >> /swo
/swg
/PlanetServer.log
103 .
/PlanetServer_d
-- \
104 -s PlanetServer sceneID
=tatooine \
105 clusterName
=$CLUSTER_NAME \
106 centralServerPort
=$CENTRAL_PLANET_PORT \
107 centralServerAddress
=$CENTRAL_SERVER_ADDRESS \
108 >> /swo
/swg
/PlanetServer.log
2>&1 &
113 CRASHDIR
="/swo/swg/CRASH-"`date +"%Y%m%d-%k.%M.%S"`
115 echo "**********************************************************************"
116 echo "** !!FATAL WARNING FATAL WARNING FATAL WARNING FATAL WARNING!!"
120 echo "** Server is no longer running. It failed to properly start."
121 echo "** If this is an unknown bug, advise the server development team."
123 echo "** A crash directory called $CRASHDIR"
124 echo "** is being created, logs and the core file will be placed in "
127 echo "**********************************************************************"
129 echo -n "Killing servers ..."
131 cp /swo
/swg
/*.log
$CRASHDIR
132 cp /swo
/swg
/current
/exe
/linux
/core
$CRASHDIR
138 #-----------------------------------------
140 #-----------------------------------------
147 echo " -s <scene> scenefile (default: $GAME_SCENE)"
148 echo " -x <exe dir> executable dir name (default: $EXE_DIR)"
149 echo " -n <nbname> nbname dir (default: $NBNAME)"
152 while getopts "hs:x:n:" arg
157 echo "Setting Game Scene to: $GAME_SCENE"
161 echo "Setting Executable Dir to: $EXE_DIR"
172 #-----------------------------------------
173 #-----------------------------------------
175 echo -n "Killing all servers you own... "
179 echo "Checking database setup..."
180 cd /swo
/swg
/current
/exe
/linux
183 echo "Port selection:"
185 echo " Central Server: game=$CENTRAL_GAME_SERVICE_PORT planet=$CENTRAL_PLANET_SERVICE_PORT"
186 echo " Connection Server: central=$CONNECTION_CENTRAL_SERVICE_PORT client=$CONNECTION_CLIENT_SERVICE_PORT game=$CONNECTION_GAME_SERVICE_PORT"
189 echo -n "Starting central server ... "
193 echo -n "Starting connection server ... "
197 echo -n "Starting database process ... "
201 echo -n "Starting planet server ... "
205 echo -n "Starting game server ... "
208 # Check for problems during startup
210 #if [ -z "`ps --User $USER | grep centralserver`" ]; then
212 # fatality "Central Server";
214 #elif [ -z "`ps --User $USER | grep connectionser`" ]; then
216 # fatality "Connection Server";
218 #elif [ -z "`ps --User $USER | grep dbprocess`" ]; then
220 # fatality "DB Process";
222 #elif [ -z "`ps --User $USER | grep gameserver`" ]; then
224 # fatality "Game Server"
230 echo "**********************************************************************"
231 echo "You may now connect to your game cluster [ $CLUSTER_NAME ]."
232 echo "Your client configuration should have an entry "
233 echo "loginServerAddress=$LOGIN_SERVER_ADDRESS "
235 echo "If you are connecting to a different login server"
236 echo "ensure that servercommon.cfg in your depot reflects the"
237 echo "alternate server address, and that your client config"
240 echo "Contact Justin Randall or Chris Mayer if you are having trouble"
241 echo "**********************************************************************"