Browse code

migration des scripts vers nouveau repo

onimaro authored on 04/02/2019 11:53:31
Showing 13 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,5 @@
0
+alias steamcmd="~steamcmd/steamcmd/steamcmd.sh"
1
+alias MAJ_Ark="~/scripts/ARK/ARK_maj.sh"
2
+alias dedieArk="~steamcmd/scripts/ARK/ARK_server_start.sh "
3
+alias MAJ_DontStarve="~/scripts/DST/DST_maj.sh"
4
+alias dedieDontStarve="~steamcmd/scripts/DST/DST_server_start.sh "
0 5
new file mode 100755
... ...
@@ -0,0 +1,16 @@
0
+#!/bin/bash
1
+source $(dirname $0)/game_globals
2
+#[ ! -r "$(dirname $0)/game.params.ori" ] && echo "Fichier de parameteres manquant : $(dirname $0)/game.params.ori" && exit 2
3
+if [ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ]; then
4
+       echo "Mise en place du fichier de parametres dans $(dirname $0)/../../params/"
5
+       mkdir -p $(dirname $0)/../../params || (echo "Echec de creation ou de verification du repertoire $(dirname $0)/../../params" && exit 3)
6
+       cp $(dirname $0)/game.params.ori $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Echec de generation du fichier de parametres standard $(dirname $0)/../../params/${GAME_NAME}.params" && exit 4)
7
+       echo "Veuillez configurer le jeu si besoin via le fichier $( ls $(dirname $0)/../../params/${GAME_NAME}.params) puis relancer le script de MAJ"
8
+       exit 0
9
+fi
10
+source $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Impossible de charger les parametres du jeu via $(dirname $0)/../../params/${GAME_NAME}.params" && exit 5)
11
+[ ! -d "${GAME_PATH}" ] && echo "creation du repertoire de jeu ${GAME_PATH}"
12
+[ -z ${GAME_STEAMID} ] && "Missing App SteamID" && exit 7
13
+echo "Mise a jour du jeu ..."
14
+echo "${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit"
15
+${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit
0 16
new file mode 100755
... ...
@@ -0,0 +1,10 @@
0
+#!/bin/bash
1
+source $(dirname $0)/game_globals
2
+[ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ] && echo "Fichier de parameteres manquant : $(dirname $0)/../../params/${GAME_NAME}.params" && exit 2
3
+source $(dirname $0)/../../params/${GAME_NAME}.params
4
+[ ! -d ${LOG_PATH} ] && mkdir -p ${LOG_PATH}
5
+[ ! -x ${GAME_BIN} ] && echo "Le binaire du jeu n'existe pas : ${GAME_BIN}"
6
+
7
+echo "Lancemement du serveur..."
8
+echo "${GAME_BIN} ${GAME_PARAMS}"
9
+nohup ${GAME_BIN} ${GAME_PARAMS} >> ${LOG_PATH}/${GAME_NAME}_server.log 2>> ${LOG_PATH}/${GAME_NAME}_server.err &
0 10
new file mode 100644
... ...
@@ -0,0 +1,23 @@
0
+<<<<<<< HEAD
1
+GAME_STEAMID=376030
2
+GAME_PATH=~/jeux/server_${GAME_NAME}
3
+LOG_PATH=~/logs/${GAME_NAME}
4
+GAME_BIN=${GAME_PATH}/ShooterGame/Binaries/Linux/ShooterGameServer
5
+SERVER_NAME=PATATE_Onimaro
6
+#GAME_PORT will be the specified port and the following (here 7779 and 7780)
7
+GAME_PORT=7779
8
+#QUERY_PORT is the port used by steam to connect players to your server
9
+QUERY_PORT=27015
10
+GAME_PARAMS="TheIsland?listen?Port=${GAME_PORT}?QueryPort=${QUERY_PORT}?SessionName=${SERVER_NAME}?PerPlatformMaxStructuresMultiplier=100?AllowPlatformeSaddleMultiFloors=true -server -log -noBattlEye"
11
+=======
12
+export GAME_STEAMID=376030
13
+export GAME_PATH=~/jeux/server_${GAME_NAME}
14
+export LOG_PATH=~/logs/${GAME_NAME}
15
+export GAME_BIN=${GAME_PATH}/ShooterGame/Binaries/Linux/ShooterGameServer
16
+export SERVER_NAME=PATATE_Onimaro
17
+export #GAME_PORT will be the specified port and the following (here 7779 and 7780)
18
+export GAME_PORT=7779
19
+export #QUERY_PORT is the port used by steam to connect players to your server
20
+export QUERY_PORT=27015
21
+export GAME_PARAMS="TheIsland?listen?Port=${GAME_PORT}?QueryPort=${QUERY_PORT}?SessionName=${SERVER_NAME}?PerPlatformMaxStructuresMultiplier=100?AllowPlatformeSaddleMultiFloors=true -server -log"
22
+>>>>>>> 4f0f0b6cb15091e3cb2eeba5038af48f1798b31b
0 23
new file mode 100644
... ...
@@ -0,0 +1,2 @@
0
+GAME_NAME="ARK"
1
+STEAMCMD=~/steamcmd/steamcmd.sh
0 2
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+# you will need to forward ports to the server (GAME_PORT ; GAME_PORT +1 ; QUERY_PORT)
1
+# ark uses huge amount of files and needs system limits to be increased : update the /etc/security/limits.conf file by adding the following values (replacing steamcmd by the user owning the server files) :
2
+# steamcmd hard nofile 100000
3
+# steamcmd soft nofile 100000
0 4
new file mode 100644
... ...
@@ -0,0 +1,5 @@
0
+export GAME_NAME='DST'
1
+export GAME_STEAMID=343050
2
+export GAME_PATH="~/jeux/server_dst/"
3
+export LOG_PATH="~/logs/${GAME_NAME}/"
4
+export STEAMCMD="~/steamcmd/steamcmd.sh"
0 5
new file mode 100755
... ...
@@ -0,0 +1,16 @@
0
+#!/bin/bash
1
+source $(dirname $0)/game_globals
2
+#[ ! -r "$(dirname $0)/game.params.ori" ] && echo "Fichier de parameteres manquant : $(dirname $0)/game.params.ori" && exit 2
3
+if [ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ]; then
4
+       echo "Mise en place du fichier de parametres dans $(dirname $0)/../../params/"
5
+       mkdir -p $(dirname $0)/../../params || (echo "Echec de creation ou de verification du repertoire $(dirname $0)/../../params" && exit 3)
6
+       cp $(dirname $0)/game.params.ori $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Echec de generation du fichier de parametres standard $(dirname $0)/../../params/${GAME_NAME}.params" && exit 4)
7
+       echo "Veuillez configurer le jeu si besoin via le fichier $( ls $(dirname $0)/../../params/${GAME_NAME}.params) puis relancer le script de MAJ"
8
+       exit 0
9
+fi
10
+source $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Impossible de charger les parametres du jeu via $(dirname $0)/../../params/${GAME_NAME}.params" && exit 5)
11
+[ ! -d "${GAME_PATH}" ] && echo "creation du repertoire de jeu ${GAME_PATH}" && mkdir -p ${GAME_PATH}
12
+[ -z ${GAME_STEAMID} ] && "Missing App SteamID" && exit 7
13
+echo "Mise a jour du jeu ..."
14
+echo "${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit"
15
+${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit
0 16
new file mode 100755
... ...
@@ -0,0 +1,36 @@
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/* && rm -rf ~steamcmd/.klei/DoNotStarveTogether/${serveur}Cluster/Caves/save/*
23
+echo
24
+echo "GAME_PATH : ${GAME_PATH}"
25
+echo
26
+cd ${GAME_PATH}/bin
27
+echo
28
+echo "  --- Demarrage du shard Don't Starve Together, Master "
29
+$(dirname $0)/DST_shard_start.sh ${serveur} Master
30
+sleep 15
31
+echo
32
+echo "  --- Demarrage du shard Don't Starve Together, Caves "
33
+$(dirname $0)/DST_shard_start.sh ${serveur} Caves
34
+echo
35
+echo "Serveur demarre"
0 36
new file mode 100755
... ...
@@ -0,0 +1,13 @@
0
+#!/bin/bash
1
+
2
+serveur=$1
3
+shard=$2
4
+
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 Missing parameter : server name XXX" && exit 1) || echo "Serveur : ${serveur}"
9
+([ -z ${shard} ] && echo "XXX Missing parameter : shard [dehors|caves] XXX" && exit 1) || echo "Shard : ${shard}"
10
+[ ${shard} != "Master" ] && [ ${shard} != "Caves" ] && echo "XXX Parameter error : shard [dehors|caves] XXX" && exit 1
11
+mkdir -p ${LOG_PATH}
12
+nohup ${GAME_BIN} ${GAME_PARAMS} >> ${LOG_PATH}/${serveur}_${shard}.out 2>>${LOG_PATH}/${serveur}_${shard}.err &
0 13
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+export GAME_PATH=~/jeux/server_${GAME_NAME}
1
+export LOG_PATH=~/logs/${GAME_NAME}
2
+export GAME_BIN=${GAME_PATH}/bin/dontstarve_dedicated_server_nullrenderer
3
+export GAME_PARAMS=-cluster ${serveur}Cluster -shard ${shard}
0 4
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+export GAME_NAME='DST'
1
+export STEAMCMD=~/steamcmd/steamcmd.sh
2
+export GAME_STEAMID='343050'
0 3
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+#!/bin/bash
1
+
2
+