2017-11-13 17:57:31 +11:00
#!/bin/bash
serveur = $1
reset = $2
2018-05-16 05:51:16 +11:00
source $( dirname $0 ) /game_globals
[ ! -r " $( dirname $0 ) /../../params/ ${ GAME_NAME } .params " ] && echo " Fichier de parameteres manquant : $( dirname $0 ) /../../params/ ${ GAME_NAME } .params " && exit 2
source $( dirname $0 ) /../../params/${ GAME_NAME } .params
2017-11-13 17:57:31 +11:00
[ -z ${ serveur } ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 1
2018-05-16 05:34:40 +11:00
[ ${ serveur } = = "-h" ] && echo "Liste des serveurs :" && echo " $( ls ~steamcmd/.klei/DoNotStarveTogether/) " && exit 0
2017-11-13 17:57:31 +11:00
[ ${ serveur } = = "-reset" ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 2
[ ! -z ${ reset } ] && [ ${ reset } != "-reset" ] && echo "Le deuxieme parametre doit etre -reset ou rien" && exit 3
echo
echo
echo "############################################"
echo "# #"
echo "# Demarrage des serveurs DST #"
echo "# #"
echo "############################################"
echo
echo " Serveur ${ serveur } "
echo
[ ! -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/*
echo
2018-05-16 08:33:40 +11:00
echo " GAME_PATH : ${ GAME_PATH } "
echo
2018-05-15 19:49:41 +11:00
cd ${ GAME_PATH } /bin
2017-11-13 17:57:31 +11:00
echo
echo " --- Don't Starve Together, exterieur "
2018-05-15 19:49:41 +11:00
$( dirname $0 ) /DST_shard_start.sh ${ serveur } Master
2017-11-13 17:57:31 +11:00
sleep 15
echo
echo " ----- Don't Starve Together, caves "
2018-05-15 19:49:41 +11:00
$( dirname $0 ) /DST_shard_start.sh ${ serveur } Caves
2017-11-13 17:57:31 +11:00
echo "Serveur demarre"