Browse code

putain de variable d\'environnement de merde \:\)

Onimaro authored on 26/07/2018 09:06:26
Showing 2 changed files
... ...
@@ -26,10 +26,11 @@ echo "GAME_PATH : ${GAME_PATH}"
26 26
 echo
27 27
 cd ${GAME_PATH}/bin
28 28
 echo
29
-echo "  --- Don't Starve Together, exterieur "
29
+echo "  --- Demarrage du shard Don't Starve Together, Master "
30 30
 $(dirname $0)/DST_shard_start.sh ${serveur} Master
31 31
 sleep 15
32 32
 echo
33
-echo "  ----- Don't Starve Together, caves "
33
+echo "  --- Demarrage du shard Don't Starve Together, Caves "
34 34
 $(dirname $0)/DST_shard_start.sh ${serveur} Caves
35
+echo
35 36
 echo "Serveur demarre"
... ...
@@ -3,8 +3,11 @@
3 3
 serveur=$1
4 4
 shard=$2
5 5
 
6
-[ -z ${serveur} ] && echo "XXX Missing parameter : server name XXX" && exit 1
7
-[ -z ${shard} ] && echo "XXX Missing parameter : shard [dehors|caves] XXX" && exit 1
6
+[ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ] && echo "Fichier de parameteres manquant : $(dirname $0)/../../params/${GAME_NAME}.params" && exit 2
7
+source $(dirname $0)/../../params/${GAME_NAME}.params
8
+
9
+([ -z ${serveur} ] && echo "XXX Missing parameter : server name XXX" && exit 1) || echo "Serveur : ${serveur}"
10
+([ -z ${shard} ] && echo "XXX Missing parameter : shard [dehors|caves] XXX" && exit 1) || echo "Shard : ${shard}"
8 11
 [ ${shard} != "Master" ] && [ ${shard} != "Caves" ] && echo "XXX Parameter error : shard [dehors|caves] XXX" && exit 1
9 12
 mkdir -p ${LOG_PATH}
10 13
 nohup ${GAME_BIN} ${GAME_PARAMS} >> ${LOG_PATH}/${serveur}_${shard}.out 2>>${LOG_PATH}/${serveur}_${shard}.err &