Suppression de supprimer l'ancienne carte en BDD lors d'une nouvelle installation si un nom de bdd est choisie.

Cela ne marchait pas toujours, voir jamais. À faire manuellement après la fin du script d'installation.
This commit is contained in:
sys4-fr 2018-07-31 23:23:50 +02:00
parent 83d4adf5aa
commit 24d83f5528
2 changed files with 14 additions and 15 deletions

View File

@ -94,7 +94,7 @@ install_0.4() {
verif verif
cd .. cd ..
else else
echo "Mise à jour annulé." echo "Mise à jour annulée"
fi fi
else else
git -c http.sslVerify=false clone -b dev $URL/server-nalc.git server-0.4 git -c http.sslVerify=false clone -b dev $URL/server-nalc.git server-0.4
@ -202,20 +202,20 @@ install_world() {
echo "Une map est déjà présente. Que souhaitez-vous faire ?" echo "Une map est déjà présente. Que souhaitez-vous faire ?"
read -p "Choisissez parmi la liste ([1]Nouveau, [2]Utiliser) : " continuer read -p "Choisissez parmi la liste ([1]Nouveau, [2]Utiliser) : " continuer
if [[ $continuer == 1 ]]; then if [[ $continuer == 1 ]]; then
if [[ -n $pg_dbname ]]; then
read -p "Les BDD $pg_name et players-$pg_name ne seront pas effacées. À vous de le faire manuellement après ce script ! -- Press enter -- : " continuer
# dropdb $pg_dbname
# dropdb players-$pg_dbname
# createdb $pg_dbname
# createdb players-$pg_dbname
fi
if [[ -d minetest/worlds/nalc_old ]]; then if [[ -d minetest/worlds/nalc_old ]]; then
rm -rf minetest/worlds/nalc_old rm -rf minetest/worlds/nalc_old
fi fi
mv minetest/worlds/nalc minetest/worlds/nalc_old mv minetest/worlds/nalc minetest/worlds/nalc_old
if [[ -n $pg_dbname ]]; then
dropdb $pg_dbname
sleep 2
dropdb players-$pg_dbname
sleep 2
createdb $pg_dbname
createdb players-$pg_dbname
fi
fi fi
fi fi
@ -386,8 +386,7 @@ init() {
elif [[ -n $url ]]; then elif [[ -n $url ]]; then
URL=$url URL=$url
else else
#URL="https://github.com/sys4-fr" URL="https://github.com/sys4-fr"
URL="https://sys4.fr/gogs/NotreAmiLeCube"
fi fi
read -p "L'installation va démarrer. Continuer ? (y or n) : " continue read -p "L'installation va démarrer. Continuer ? (y or n) : " continue

View File

@ -49,10 +49,10 @@ server_name = NotreAmiLeCube (Survival & PVP) [FR/EN]
server_description = Server hosted by sys4. This server have a class system(Warrior, Hunter, Wizard) and is highly modded, content-rich, good luck to survive and have fun! [This server is a fork from MinetestForFun Classic] server_description = Server hosted by sys4. This server have a class system(Warrior, Hunter, Wizard) and is highly modded, content-rich, good luck to survive and have fun! [This server is a fork from MinetestForFun Classic]
motd = Welcome to "NotreAmiLeCube (Survival & PVP) [EN/FR]" server! / Bienvenue sur le serveur "NotreAmiLeCube (Survie & PVP) [FR/EN]" ! motd = Welcome to "NotreAmiLeCube (Survival & PVP) [EN/FR]" server! / Bienvenue sur le serveur "NotreAmiLeCube (Survie & PVP) [FR/EN]" !
serverlist_url = servers.minetest.net serverlist_url = servers.minetest.net
server_url = http://mff.sys4.fr/ server_url = <URL>
server_announce = false server_announce = false
server_address = 78.210.252.189 server_address = <IP>
port = 30002 port = <UDP port>
# curl default 5sec but timeout, fix to 15sec # curl default 5sec but timeout, fix to 15sec
curl_timeout = 15000 curl_timeout = 15000