Browse code

miase a jour du script de demarrage (tout le monde kiffe les miases)

Onimaro authored on 15/05/2018 18:51:16
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,33 @@
0
+#!/bin/bash
1
+serveur=$1
2
+reset=$2
3
+
4
+source $(dirname $0)/game_globals
5
+[ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ] && echo "Fichier de parameteres manquant : $(dirname $0)/../../params/${GAME_NAME}.params" && exit 2
6
+source $(dirname $0)/../../params/${GAME_NAME}.params
7
+
8
+[ -z ${serveur} ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 1
9
+[ ${serveur} == "-h" ] && echo "Liste des serveurs :" && echo "$(ls ~steamcmd/.klei/DoNotStarveTogether/)" && exit 0
10
+[ ${serveur} == "-reset" ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 2
11
+[ ! -z ${reset} ] && [ ${reset} != "-reset" ] && echo "Le deuxieme parametre doit etre -reset ou rien" && exit 3
12
+echo
13
+echo
14
+echo "############################################"
15
+echo "#                                          #"
16
+echo "#        Demarrage des serveurs DST        #"
17
+echo "#                                          #"
18
+echo "############################################"
19
+echo
20
+echo "  Serveur ${serveur}"
21
+echo
22
+[ ! -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/*
23
+echo
24
+cd ${GAME_PATH}/bin
25
+echo
26
+echo "  --- Don't Starve Together, exterieur "
27
+$(dirname $0)/DST_shard_start.sh ${serveur} Master
28
+sleep 15
29
+echo
30
+echo "  ----- Don't Starve Together, caves "
31
+$(dirname $0)/DST_shard_start.sh ${serveur} Caves
32
+echo "Serveur demarre"
... ...
@@ -1,7 +1,11 @@
1 1
 #!/bin/bash
2
-
3 2
 serveur=$1
4 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
+
5 9
 [ -z ${serveur} ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 1
6 10
 [ ${serveur} == "-h" ] && echo "Liste des serveurs :" && echo "$(ls ~steamcmd/.klei/DoNotStarveTogether/)" && exit 0
7 11
 [ ${serveur} == "-reset" ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 2