Browse code

bordel

Onimaro authored on 15/05/2018 21:33:40
Showing 5 changed files
1 1
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-#!/bin/bash
2
-serveur=$1
3
-reset=$2
4
-
5
-source $(dirname $0)/game_globals
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 Parametre manquant : nom du serveur XXX" && exit 1
10
-[ ${serveur} == "-h" ] && echo "Liste des serveurs :" && echo "$(ls ~steamcmd/.klei/DoNotStarveTogether/)" && exit 0
11
-[ ${serveur} == "-reset" ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 2
12
-[ ! -z ${reset} ] && [ ${reset} != "-reset" ] && echo "Le deuxieme parametre doit etre -reset ou rien" && exit 3
13
-echo
14
-echo
15
-echo "############################################"
16
-echo "#                                          #"
17
-echo "#        Demarrage des serveurs DST        #"
18
-echo "#                                          #"
19
-echo "############################################"
20
-echo
21
-echo "  Serveur ${serveur}"
22
-echo
23
-[ ! -z ${reset} ] && [ ${reset} == "-reset" ] && echo "Remise a zero du serveur." && rm -rf ~steamcmd/.klei/DoNotStarveTogether/${serveur}Cluster/Master/save/session/* && rm -rf ~steamcmd/.klei/DoNotStarveTogether/${serveur}Cluster/Caves/save/session/*
24
-echo
25
-cd ${GAME_PATH}/bin
26
-echo
27
-echo "  --- Don't Starve Together, exterieur "
28
-$(dirname $0)/DST_shard_start.sh ${serveur} Master
29
-sleep 15
30
-echo
31
-echo "  ----- Don't Starve Together, caves "
32
-$(dirname $0)/DST_shard_start.sh ${serveur} Caves
33
-echo "Serveur demarre"
... ...
@@ -1,5 +1,5 @@
1
-export GAME_NAME=DST
1
+export GAME_NAME='DST'
2 2
 export GAME_STEAMID=343050
3
-export GAME_PATH=/jeux/server_dst/
4
-export LOG_PATH=~/logs/${GAME_NAME}/
5
-export STEAMCMD=/home/steamcmd/steamcmd.sh
3
+export GAME_PATH="~/jeux/server_dst/"
4
+export LOG_PATH="~/logs/${GAME_NAME}/"
5
+export STEAMCMD="~/steamcmd/steamcmd.sh"
... ...
@@ -9,7 +9,7 @@ if [ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ]; then
9 9
        exit 0
10 10
 fi
11 11
 source $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Impossible de charger les parametres du jeu via $(dirname $0)/../../params/${GAME_NAME}.params" && exit 5)
12
-[ ! -d "${GAME_PATH}" ] && echo "creation du repertoire de jeu ${GAME_PATH}"
12
+[ ! -d "${GAME_PATH}" ] && echo "creation du repertoire de jeu ${GAME_PATH}" && mkdir -p ${GAME_PATH}
13 13
 [ -z ${GAME_STEAMID} ] && "Missing App SteamID" && exit 7
14 14
 echo "Mise a jour du jeu ..."
15 15
 echo "${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit"
... ...
@@ -22,6 +22,8 @@ echo "  Serveur ${serveur}"
22 22
 echo
23 23
 [ ! -z ${reset} ] && [ ${reset} == "-reset" ] && echo "Remise a zero du serveur." && rm -rf ~steamcmd/.klei/DoNotStarveTogether/${serveur}Cluster/Master/save/session/* && rm -rf ~steamcmd/.klei/DoNotStarveTogether/${serveur}Cluster/Caves/save/session/*
24 24
 echo
25
+echo "GAME_PATH : ${GAME_PATH}"
26
+echo
25 27
 cd ${GAME_PATH}/bin
26 28
 echo
27 29
 echo "  --- Don't Starve Together, exterieur "
... ...
@@ -1,4 +1,4 @@
1
-GAME_PATH="~/jeux/server_${GAME_NAME}"
2
-LOG_PATH="~/logs/${GAME_NAME}"
3
-GAME_BIN="${GAME_PATH}/bin/dontstarve_dedicated_server_nullrenderer"
4
-GAME_PARAMS="-console -cluster ${serveur}Cluster -shard ${shard}"
1
+GAME_PATH=~/jeux/server_${GAME_NAME}
2
+LOG_PATH=~/logs/${GAME_NAME}
3
+GAME_BIN=${GAME_PATH}/bin/dontstarve_dedicated_server_nullrenderer
4
+GAME_PARAMS=-console -cluster ${serveur}Cluster -shard ${shard}