migration des scripts vers nouveau repo
This commit is contained in:
commit
9e5ef54604
5
.bash_aliases
Normal file
5
.bash_aliases
Normal file
@ -0,0 +1,5 @@
|
||||
alias steamcmd="~steamcmd/steamcmd/steamcmd.sh"
|
||||
alias MAJ_Ark="~/scripts/ARK/ARK_maj.sh"
|
||||
alias dedieArk="~steamcmd/scripts/ARK/ARK_server_start.sh "
|
||||
alias MAJ_DontStarve="~/scripts/DST/DST_maj.sh"
|
||||
alias dedieDontStarve="~steamcmd/scripts/DST/DST_server_start.sh "
|
16
ARK/ARK_maj.sh
Executable file
16
ARK/ARK_maj.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
source $(dirname $0)/game_globals
|
||||
#[ ! -r "$(dirname $0)/game.params.ori" ] && echo "Fichier de parameteres manquant : $(dirname $0)/game.params.ori" && exit 2
|
||||
if [ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ]; then
|
||||
echo "Mise en place du fichier de parametres dans $(dirname $0)/../../params/"
|
||||
mkdir -p $(dirname $0)/../../params || (echo "Echec de creation ou de verification du repertoire $(dirname $0)/../../params" && exit 3)
|
||||
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)
|
||||
echo "Veuillez configurer le jeu si besoin via le fichier $( ls $(dirname $0)/../../params/${GAME_NAME}.params) puis relancer le script de MAJ"
|
||||
exit 0
|
||||
fi
|
||||
source $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Impossible de charger les parametres du jeu via $(dirname $0)/../../params/${GAME_NAME}.params" && exit 5)
|
||||
[ ! -d "${GAME_PATH}" ] && echo "creation du repertoire de jeu ${GAME_PATH}"
|
||||
[ -z ${GAME_STEAMID} ] && "Missing App SteamID" && exit 7
|
||||
echo "Mise a jour du jeu ..."
|
||||
echo "${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit"
|
||||
${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit
|
10
ARK/ARK_server_start.sh
Executable file
10
ARK/ARK_server_start.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
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
|
||||
[ ! -d ${LOG_PATH} ] && mkdir -p ${LOG_PATH}
|
||||
[ ! -x ${GAME_BIN} ] && echo "Le binaire du jeu n'existe pas : ${GAME_BIN}"
|
||||
|
||||
echo "Lancemement du serveur..."
|
||||
echo "${GAME_BIN} ${GAME_PARAMS}"
|
||||
nohup ${GAME_BIN} ${GAME_PARAMS} >> ${LOG_PATH}/${GAME_NAME}_server.log 2>> ${LOG_PATH}/${GAME_NAME}_server.err &
|
23
ARK/game.params.ori
Normal file
23
ARK/game.params.ori
Normal file
@ -0,0 +1,23 @@
|
||||
<<<<<<< HEAD
|
||||
GAME_STEAMID=376030
|
||||
GAME_PATH=~/jeux/server_${GAME_NAME}
|
||||
LOG_PATH=~/logs/${GAME_NAME}
|
||||
GAME_BIN=${GAME_PATH}/ShooterGame/Binaries/Linux/ShooterGameServer
|
||||
SERVER_NAME=PATATE_Onimaro
|
||||
#GAME_PORT will be the specified port and the following (here 7779 and 7780)
|
||||
GAME_PORT=7779
|
||||
#QUERY_PORT is the port used by steam to connect players to your server
|
||||
QUERY_PORT=27015
|
||||
GAME_PARAMS="TheIsland?listen?Port=${GAME_PORT}?QueryPort=${QUERY_PORT}?SessionName=${SERVER_NAME}?PerPlatformMaxStructuresMultiplier=100?AllowPlatformeSaddleMultiFloors=true -server -log -noBattlEye"
|
||||
=======
|
||||
export GAME_STEAMID=376030
|
||||
export GAME_PATH=~/jeux/server_${GAME_NAME}
|
||||
export LOG_PATH=~/logs/${GAME_NAME}
|
||||
export GAME_BIN=${GAME_PATH}/ShooterGame/Binaries/Linux/ShooterGameServer
|
||||
export SERVER_NAME=PATATE_Onimaro
|
||||
export #GAME_PORT will be the specified port and the following (here 7779 and 7780)
|
||||
export GAME_PORT=7779
|
||||
export #QUERY_PORT is the port used by steam to connect players to your server
|
||||
export QUERY_PORT=27015
|
||||
export GAME_PARAMS="TheIsland?listen?Port=${GAME_PORT}?QueryPort=${QUERY_PORT}?SessionName=${SERVER_NAME}?PerPlatformMaxStructuresMultiplier=100?AllowPlatformeSaddleMultiFloors=true -server -log"
|
||||
>>>>>>> 4f0f0b6cb15091e3cb2eeba5038af48f1798b31b
|
2
ARK/game_globals
Normal file
2
ARK/game_globals
Normal file
@ -0,0 +1,2 @@
|
||||
GAME_NAME="ARK"
|
||||
STEAMCMD=~/steamcmd/steamcmd.sh
|
4
ARK/readme
Normal file
4
ARK/readme
Normal file
@ -0,0 +1,4 @@
|
||||
# you will need to forward ports to the server (GAME_PORT ; GAME_PORT +1 ; QUERY_PORT)
|
||||
# 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) :
|
||||
# steamcmd hard nofile 100000
|
||||
# steamcmd soft nofile 100000
|
5
DST/DST.params
Normal file
5
DST/DST.params
Normal file
@ -0,0 +1,5 @@
|
||||
export GAME_NAME='DST'
|
||||
export GAME_STEAMID=343050
|
||||
export GAME_PATH="~/jeux/server_dst/"
|
||||
export LOG_PATH="~/logs/${GAME_NAME}/"
|
||||
export STEAMCMD="~/steamcmd/steamcmd.sh"
|
16
DST/DST_maj.sh
Executable file
16
DST/DST_maj.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
source $(dirname $0)/game_globals
|
||||
#[ ! -r "$(dirname $0)/game.params.ori" ] && echo "Fichier de parameteres manquant : $(dirname $0)/game.params.ori" && exit 2
|
||||
if [ ! -r "$(dirname $0)/../../params/${GAME_NAME}.params" ]; then
|
||||
echo "Mise en place du fichier de parametres dans $(dirname $0)/../../params/"
|
||||
mkdir -p $(dirname $0)/../../params || (echo "Echec de creation ou de verification du repertoire $(dirname $0)/../../params" && exit 3)
|
||||
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)
|
||||
echo "Veuillez configurer le jeu si besoin via le fichier $( ls $(dirname $0)/../../params/${GAME_NAME}.params) puis relancer le script de MAJ"
|
||||
exit 0
|
||||
fi
|
||||
source $(dirname $0)/../../params/${GAME_NAME}.params || (echo "Impossible de charger les parametres du jeu via $(dirname $0)/../../params/${GAME_NAME}.params" && exit 5)
|
||||
[ ! -d "${GAME_PATH}" ] && echo "creation du repertoire de jeu ${GAME_PATH}" && mkdir -p ${GAME_PATH}
|
||||
[ -z ${GAME_STEAMID} ] && "Missing App SteamID" && exit 7
|
||||
echo "Mise a jour du jeu ..."
|
||||
echo "${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit"
|
||||
${STEAMCMD} +login anonymous +force_install_dir ${GAME_PATH} +app_update ${GAME_STEAMID} +quit
|
36
DST/DST_server_start.sh
Executable file
36
DST/DST_server_start.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
serveur=$1
|
||||
reset=$2
|
||||
|
||||
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
|
||||
|
||||
[ -z ${serveur} ] && echo "XXX Parametre manquant : nom du serveur XXX" && exit 1
|
||||
[ ${serveur} == "-h" ] && echo "Liste des serveurs :" && echo "$(ls ~steamcmd/.klei/DoNotStarveTogether/)" && exit 0
|
||||
[ ${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/* && rm -rf ~steamcmd/.klei/DoNotStarveTogether/${serveur}Cluster/Caves/save/*
|
||||
echo
|
||||
echo "GAME_PATH : ${GAME_PATH}"
|
||||
echo
|
||||
cd ${GAME_PATH}/bin
|
||||
echo
|
||||
echo " --- Demarrage du shard Don't Starve Together, Master "
|
||||
$(dirname $0)/DST_shard_start.sh ${serveur} Master
|
||||
sleep 15
|
||||
echo
|
||||
echo " --- Demarrage du shard Don't Starve Together, Caves "
|
||||
$(dirname $0)/DST_shard_start.sh ${serveur} Caves
|
||||
echo
|
||||
echo "Serveur demarre"
|
13
DST/DST_shard_start.sh
Executable file
13
DST/DST_shard_start.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
serveur=$1
|
||||
shard=$2
|
||||
|
||||
[ ! -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
|
||||
|
||||
([ -z ${serveur} ] && echo "XXX Missing parameter : server name XXX" && exit 1) || echo "Serveur : ${serveur}"
|
||||
([ -z ${shard} ] && echo "XXX Missing parameter : shard [dehors|caves] XXX" && exit 1) || echo "Shard : ${shard}"
|
||||
[ ${shard} != "Master" ] && [ ${shard} != "Caves" ] && echo "XXX Parameter error : shard [dehors|caves] XXX" && exit 1
|
||||
mkdir -p ${LOG_PATH}
|
||||
nohup ${GAME_BIN} ${GAME_PARAMS} >> ${LOG_PATH}/${serveur}_${shard}.out 2>>${LOG_PATH}/${serveur}_${shard}.err &
|
4
DST/game.params.ori
Normal file
4
DST/game.params.ori
Normal file
@ -0,0 +1,4 @@
|
||||
export GAME_PATH=~/jeux/server_${GAME_NAME}
|
||||
export LOG_PATH=~/logs/${GAME_NAME}
|
||||
export GAME_BIN=${GAME_PATH}/bin/dontstarve_dedicated_server_nullrenderer
|
||||
export GAME_PARAMS=-cluster ${serveur}Cluster -shard ${shard}
|
3
DST/game_globals
Normal file
3
DST/game_globals
Normal file
@ -0,0 +1,3 @@
|
||||
export GAME_NAME='DST'
|
||||
export STEAMCMD=~/steamcmd/steamcmd.sh
|
||||
export GAME_STEAMID='343050'
|
3
add_game.sh
Normal file
3
add_game.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user